diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-16 03:01:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-16 03:01:55 +0000 |
commit | 13d3072f418835569f37f65b5055e5b3180fad2e (patch) | |
tree | 6964b91e90d3bddbc3d5ce302897c35a248ddf6b /modules/system/system.api.php | |
parent | b965f7478f34c78b747ad6667738828599e86df7 (diff) | |
download | brdo-13d3072f418835569f37f65b5055e5b3180fad2e.tar.gz brdo-13d3072f418835569f37f65b5055e5b3180fad2e.tar.bz2 |
- Patch #356074 by chx, Damien Tournoud: provide a sequences API.
Diffstat (limited to 'modules/system/system.api.php')
-rw-r--r-- | modules/system/system.api.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 1f4d1d394..d29a16035 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -12,6 +12,38 @@ */ /** + * Defines one or more hooks that are exposed by a module. + * + * Normally hooks do not need to be explicitly defined. However, by declaring a + * hook explicitly, a module may define a "group" for it. Modules that implement + * a hook may then place their implementation in either $module.module or in + * $module.$group.inc. If the hook is located in $module.$group.inc, then that + * file will be automatically loaded when needed. + * In general, hooks that are rarely invoked and/or are very large should be + * placed in a separate include file, while hooks that are very short or very + * frequently called should be left in the main module file so that they are + * always available. + * + * @return + * An associative array whose keys are hook names and whose values are an + * associative array containing: + * - group: A string defining the group to which the hook belongs. The module + * system will determine whether a file with the name $module.$group.inc + * exists, and automatically load it when required. + * + * See system_hook_info() for all hook groups defined by Drupal core. + */ +function hook_hook_info() { + $hooks['token_info'] = array( + 'group' => 'tokens', + ); + $hooks['tokens'] = array( + 'group' => 'tokens', + ); + return $hooks; +} + +/** * Inform the base system and the Field API about one or more entity types. * * Inform the system about one or more entity types (i.e., object types that @@ -700,7 +732,7 @@ function hook_image_toolkits() { * * Email messages sent using functions other than drupal_mail() will not * invoke hook_mail_alter(). For example, a contributed module directly - * calling the drupal_mail_sending_system()->mail() or PHP mail() function + * calling the drupal_mail_system()->mail() or PHP mail() function * will not invoke this hook. All core modules use drupal_mail() for * messaging, it is best practice but not manditory in contributed modules. * |