| Versionen | |
|---|---|
| drupal6 – drupal7 | hook_hook_info() |
Expose a list of triggers (events) that users can assign actions to.
A nested array:
hook_action_info(), which allows your module to define actions.
Note: Implementing this hook doesn't actually make any action functions run. It just lets the trigger module set up an admin page that will let a site administrator assign actions to hooks. To make this work, module needs to:
developer-docs/
<?php
function hook_hook_info() {
return array(
'comment' => array(
'comment' => array(
'insert' => array(
'runs when' => t('After saving a new comment'),
),
'update' => array(
'runs when' => t('After saving an updated comment'),
),
'delete' => array(
'runs when' => t('After deleting a comment')
),
'view' => array(
'runs when' => t('When a comment is being viewed by an authenticated user')
),
),
),
);
}
?>
Kommentare
Kommentar hinzufügen