Skip to content

Instantly share code, notes, and snippets.

@annikaC
annikaC / MYMODULE.module
Last active February 8, 2018 15:12 — forked from ndeet/MYTHEME.info
Drupal 7, Panels 3.3+ Pane Style Plugin
/**
* Implements hook_ctools_plugin_directory().
*/
function MYMODULE_ctools_plugin_directory($module, $plugin) {
if ($module === 'panels' || $module === 'ctools' && !empty($plugin)) {
return "plugins/{$plugin}";
}
}
// Change font (ctrl a)
var font_name = [doc askForUserInput:"Font name:" initialValue:"Arial"];
function check_layer(layer){
log("Checking layer " + layer + " of klass: " + [layer class])
switch ([layer class]) {
case MSTextLayer:
log("Found text layer!")
layer.setFontPostscriptName(font_name);
break;

PHP Developer Interview: What you should know

###1. What’s the difference between " self " and " this " ?

Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.

Source: When to use self vs this -stackoverflow