Declares information about actions.
Any module can define actions, and then call actions_do() to make those actions happen in response to events.
An action consists of two or three parts:
The action function takes two to four arguments, which come from the input arguments to actions_do().
An associative array of action descriptions. The keys of the array are the names of the action functions, and each corresponding value is an associative array with the following key-value pairs:
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_action_info() {
return array(
'comment_unpublish_action' => array(
'type' => 'comment',
'label' => t('Unpublish comment'),
'configurable' => FALSE,
'behavior' => array(
'changes_property',
),
'triggers' => array(
'comment_presave',
'comment_insert',
'comment_update',
),
),
'comment_unpublish_by_keyword_action' => array(
'type' => 'comment',
'label' => t('Unpublish comment containing keyword(s)'),
'configurable' => TRUE,
'behavior' => array(
'changes_property',
),
'triggers' => array(
'comment_presave',
'comment_insert',
'comment_update',
),
),
'comment_save_action' => array(
'type' => 'comment',
'label' => t('Save comment'),
'configurable' => FALSE,
'triggers' => array(
'comment_insert',
'comment_update',
),
),
);
}