trigger_example_action_info_alter

Versions
7
trigger_example_action_info_alter(&$info)

*

  • None of the built-in actions will be enabled for our hook by default. We
  • need to implement hook_action_info_alter() so that we can enable a couple.

Code

developer/examples/trigger_example.module, line 116

<?php
function trigger_example_action_info_alter(&$info) {
  if (isset($info['system_message_action']['hooks'])) {
    $info['system_message_action']['hooks']['trigger_example'] = array('ping', 'pong');
  }
  if (isset($info['system_send_email_action']['hooks'])) {
    $info['system_send_email_action']['hooks']['trigger_example'] = array('ping', 'pong');
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.