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 that the events have occurred, calling trigger_get_assigned_actions() to find out which actions the user has associated with your trigger, and then calling actions_do() to fire off the actions.
A nested associative array.
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.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_trigger_info() {
return array(
'node' => array(
'node_presave' => array(
'label' => t('When either saving new content or updating existing content'),
),
'node_insert' => array(
'label' => t('After saving new content'),
),
'node_update' => array(
'label' => t('After saving updated content'),
),
'node_delete' => array(
'label' => t('After deleting content'),
),
'node_view' => array(
'label' => t('When content is viewed by an authenticated user'),
),
),
);
}