array(hook_install) */ function module_builder_module_builder_info() { // Versions 5 and 6. $data['common'] = array( // Hooks on behalf of Drupal core. 'system' => array( 'url' => 'http://drupalcode.org/project/documentation.git/blob_plain/refs/heads/%branch:/developer/hooks/%file', 'branch' => '6.x-1.x', 'group' => '#filenames', 'hook_files' => array( // List of files we should slurp from the url for hook defs. // and the destination file for processed code. 'core.php' => '%module.module', 'node.php' => '%module.module', 'install.php' => '%module.install', ), ), // We need to do our own stuff now we have a hook! 'module_builder' => array( 'url' => 'http://drupalcode.org/project/module_builder.git/blob_plain/refs/heads/%branch:/hooks/%file', 'branch' => '6.x-2.x', 'group' => 'module builder', 'hook_files' => array( 'module_builder.php' => '%module.module_builder.inc', ), ), // Support for some contrib modules (the ones I use ;) -- for more please // file a patch either here or with the module in question. // Views 'views' => array( 'url' => 'http://drupalcode.org/project/views.git/blob_plain/refs/heads/%branch:/docs/%file', // Probably should follow master as that may go away 'branch' => 'master', 'group' => 'views', 'hook_files' => array( 'docs.php' => '%module.module', // other files here: view.inc, views.default.inc ), // hooks that go in files other than %module.module 'hook_destinations' => array( '%module.views.inc' => array( 'hook_views_data', 'hook_views_data_alter', 'hook_views_admin_links_alter', 'hook_views_handlers', 'hook_views_plugins', 'hook_views_preview_info_alter', 'hook_views_query_alter', ), '%module.views_convert.inc' => array( 'hook_views_convert', ), '%module.views_default.inc' => array( 'hook_views_default_views', ), ), ), // Ubercart 'ubercart' => array( 'url' => 'http://drupalcode.org/project/ubercart.git/blob_plain/refs/heads/%branch:/docs/%file', 'branch' => '6.x-2.x', 'group' => 'ubercart', 'hook_files' => array( 'hooks.php' => '%module.module', ), ), // Signup 'signup' => array( 'url' => 'http://drupalcode.org/project/signup.git/blob_plain/refs/heads/%branch:/%file', 'branch' => '6.x-2.x', 'group' => 'signup', 'hook_files' => array( 'signup.api.php' => '%module.module', ), ), // Ctools 'ctools' => array( 'url' => 'http://drupalcode.org/project/ctools.git/blob_plain/refs/heads/%branch:/%file', 'branch' => '6.x-1.x', 'group' => 'ctools', 'hook_files' => array( 'ctools.api.php' => '%module.module', ), ), // Webform 'webform' => array( 'url' => 'http://drupalcode.org/project/webform.git/blob_plain/refs/heads/%branch:/%file', 'branch' => '6.x-3.x', 'group' => 'webform', 'hook_files' => array( 'webform_hooks.php' => '%module.module', ), ), ); // For D7, keys should match the filename MODULE.api.php $data['7'] = array( // Hooks on behalf of Drupal core. 'system' => array( 'hook_destinations' => array( '%module.install' => array( 'hook_requirements', 'hook_schema', 'hook_schema_alter', 'hook_install', 'hook_update_N', 'hook_update_last_removed', 'hook_uninstall', 'hook_enable', 'hook_disable', ), ), ), ); // Return the data for the current version. $version = _module_builder_drupal_major_version(); if (isset($data[$version])) { return $data[$version]; } else { return $data['common']; } }