diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-04-22 06:33:06 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-04-22 06:33:06 +0000 |
commit | 5e39cb73cb4cc89447d135b140ab1b15877f8420 (patch) | |
tree | d71c80778a5cf531b878a5c3f583e5af94d9ff6c /modules/trigger | |
parent | 191e34d16c7eb20183123735a95a0f97813f5cc1 (diff) | |
download | brdo-5e39cb73cb4cc89447d135b140ab1b15877f8420.tar.gz brdo-5e39cb73cb4cc89447d135b140ab1b15877f8420.tar.bz2 |
#776728 by jhodgdon: Fixed hook_trigger_info_alter() is undocumented.
Diffstat (limited to 'modules/trigger')
-rw-r--r-- | modules/trigger/trigger.api.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/modules/trigger/trigger.api.php b/modules/trigger/trigger.api.php index 23c700741..2e3329c32 100644 --- a/modules/trigger/trigger.api.php +++ b/modules/trigger/trigger.api.php @@ -12,7 +12,7 @@ */ /** - * Declares triggers (events) for users to assign actions to. + * Declare triggers (events) for users to assign actions to. * * This hook is used by the trigger module to create a list of triggers (events) * that users can assign actions to. Your module is responsible for detecting @@ -20,8 +20,6 @@ * out which actions the user has associated with your trigger, and then calling * actions_do() to fire off the actions. * - * @see hook_action_info() - * * @return * A nested associative array. * - The outermost key is the name of the module that is defining the triggers. @@ -38,6 +36,9 @@ * For example, the trigger set for the 'node' module has 'node' as the * outermost key and defines triggers for 'node_insert', 'node_update', * 'node_delete' etc. that fire when a node is saved, updated, etc. + * + * @see hook_action_info() + * @see hook_trigger_info_alter() */ function hook_trigger_info() { return array( @@ -62,5 +63,17 @@ function hook_trigger_info() { } /** + * Alter triggers declared by hook_trigger_info(). + * + * @param $triggers + * Array of trigger information returned by hook_trigger_info() + * implementations. Modify this array in place. See hook_trigger_info() + * for information on what this might contain. + */ +function hook_trigger_info_alter(&$triggers) { + $triggers['node']['node_insert']['label'] = t('When content is saved'); +} + +/** * @} End of "addtogroup hooks". */ |