function trigger_example_hook_info in Examples for Developers 6
Implementation of hook_hook_info().
This hook is used to tell Drupal which hooks we provide that can be used as triggers for actions. We provide a text description of when each of the operations occurs.
Related topics
File
- trigger_example/
trigger_example.module, line 49
Code
function trigger_example_hook_info() {
return array(
'trigger_example' => array(
// One important thing to note here. If you want to use the trigger
// module's default menu and forms handlers your hook needs to have the
// same name as your module. If you've got the "foo" module with a hook
// "hook_fooapi" then you're going to have to implement hook_forms and
// map the form ids back to the trigger_assign_form callback.
'trigger_example' => array(
'ping' => array(
'runs when' => t('A ping happens'),
),
'pong' => array(
'runs when' => t('A pong happens'),
),
),
),
);
}