Midcamp 2014
Dave Reid / @davereid
Senior Developer at Lullabot
Twitter: @davereid
IRC: davereid
Maintain amost 2% of contrib modules
Core subsystem maintainer
Father of two cats and one boy
For your site builders
and architects to make
informed choices now
Ease pain of site users
when switching to Drupal 8
https://drupal.org/project/responsive_bartik
https://drupal.org/project/admin_views
https://drupal.org/project/views_bulk_operations
https://drupal.org/project/instantfilter
https://drupal.org/project/simplified_menu_admin
<img data-align="center" data-caption="Test caption" ... />
/**
* Implements hook_mymodule_hook_info().
*/
function example_mymodule_hook_info() {
$info['example'] = array(
'label' => t('Example implementation'),
'callback' => 'example_mymodule_callback',
'settings form' => 'example_mymodule_form',
);
return $info;
}
/**
* Implements hook_ctools_plugin_directory().
*/
function example_ctools_plugin_directory($module, $plugin) {
if ($module == 'mymodule' && $plugin == 'hook') {
return "plugins/$module/$plugin";
}
}
// plugins/example/hook/example_implementation.inc
$plugin = array(
'title' => t('Example implementation'),
'class' => 'ExampleMyModuleHookImplementation',
);
// plugins/example/hook/ExampleImplementation.class.php
class ExampleMyModuleHookImplementation {
// Does stuff.
}
class MyModuleHookPluginInterface {
public static function getInstance($config = array());
public function getDefaults();
public function process($config);
}
lib/MyModuleHookPluginBase.phpabstract class MyModuleHookPluginBase extends MyModuleHookPluginInterface {
public funciton getInstnace($config = array()) {
$class = get_called_class();
return new $class($config);
}
public function getDefaults() {
return array();
}
abstract public function process($config);
}
/**
* Implements hook_mymodule_hook_info().
*/
function example_mymodule_hook_info() {
$info['example'] =
'label' => t('Example implementation'),
'class' => ExampleMyModuleHookPlugin',
);
return $info;
}
example.info
files[] = lib/ExampleMyModuleHookPlugin.php
lib/ExampleMyModuleHookPlugin.phpclass ExampleMyModuleHookPlugin extends MyModuleHookPluginBase {
public function process($config) {
// Do stuff!
}
}
https://drupal.org/project/migrate
https://drupal.org/project/migrate_d2d
https://drupal.org/project/restws
NOT services module