function trigger_example_trigger_info
Implements hook_trigger_info().
We call hook_trigger_info when we are defining the triggers we provide. Triggers are the events that make fire any number of assigned actions. In this example, we are registering our three new triggers, providing the group (system, user..), the callback 'hook' (only informative, does not require a real hook) function and the label to be shown in the triggers interface.
Example: In the group (a tab) 'system', for the 'mail' functionality, show: An email is sent by Drupal.
Related topics
File
-
trigger_example/
trigger_example.module, line 90
Code
function trigger_example_trigger_info() {
return array(
'user' => array(
'user_first_time_login' => array(
'label' => t('After a user has logged in for the first time'),
),
),
'trigger_example' => array(
'triggersomething' => array(
'label' => t('After the triggersomething button is clicked'),
),
),
);
}