| 7 trigger.module | 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.
9 calls to trigger_get_assigned_actions()
4 string references to 'trigger_get_assigned_actions'
File
- modules/
trigger/ trigger.module, line 166 - Enables functions to be stored and executed at a later time.
Code
function trigger_get_assigned_actions($hook) {
$actions = &drupal_static(__FUNCTION__, array());
if (!isset($actions[$hook])) {
$actions[$hook] = 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);
}
return $actions[$hook];
}
Login or register to post comments