trigger_get_assigned_actions

Versions
mediamosa-21
trigger_get_assigned_actions($hook)

Gets the action IDs of actions to be executed for a hook.

Parameters

$hook The name of the hook being fired.

Return value

An array whose keys are action IDs that the user has associated with this trigger, and whose values are arrays containing the action type and label.

▾ 8 functions call trigger_get_assigned_actions()

actions_loop_test_watchdog in modules/simpletest/tests/actions_loop_test.module
Implements hook_watchdog().
trigger_assign_form in modules/trigger/trigger.admin.inc
Returns the form for assigning an action to a trigger.
trigger_cron in modules/trigger/trigger.module
Implements hook_cron().
trigger_trigger_info in modules/trigger/trigger.module
Implements hook_trigger_info().
_trigger_comment in modules/trigger/trigger.module
Calls action functions for comment triggers.
_trigger_node in modules/trigger/trigger.module
Calls action functions for node triggers.
_trigger_taxonomy in modules/trigger/trigger.module
Calls action functions for taxonomy triggers.
_trigger_user in modules/trigger/trigger.module
Calls action functions for user triggers.

Code

modules/trigger/trigger.module, line 182

<?php
function trigger_get_assigned_actions($hook) {
  return db_query("SELECT ta.aid, a.type, a.label FROM {trigger_assignments} ta LEFT JOIN {actions} a ON ta.aid = a.aid WHERE ta.hook = :hook ORDER BY ta.weight", array(
    ':hook' => $hook,
  ))->fetchAllAssoc( 'aid', PDO::FETCH_ASSOC);
}
?>