You are here

function workflow_actions_action_info_alter in Workflow 7.2

Same name and namespace in other branches
  1. 6.2 workflow_actions/workflow_actions.module \workflow_actions_action_info_alter()
  2. 6 workflow_actions/workflow_actions.module \workflow_actions_action_info_alter()
  3. 7 workflow_actions/workflow_actions.module \workflow_actions_action_info_alter()

Implements hook_drupal_alter().

File

workflow_actions/workflow_actions.module, line 220
Enables actions to be fired upon a Workflow State change.

Code

function workflow_actions_action_info_alter(&$info) {
  $triggers = workflow_actions_trigger_info();
  if (empty($triggers)) {
    return;
  }

  // Loop through all available node actions and add them as triggers.
  foreach ($triggers as $groups) {
    foreach ($groups as $trigger_name => $data) {
      foreach (node_action_info() as $action => $data) {
        $info[$action]['triggers'][] = $trigger_name;
      }
    }
  }
}