function trigger_get_assigned_actions

cis7 trigger.module trigger_get_assigned_actions($hook)
cle7 trigger.module trigger_get_assigned_actions($hook)
elmsmedia7 trigger.module trigger_get_assigned_actions($hook)
icor7 trigger.module trigger_get_assigned_actions($hook)
meedjum_blog7 trigger.module trigger_get_assigned_actions($hook)
mooc7 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.

8 calls to trigger_get_assigned_actions()
actions_loop_test_watchdog in modules/simpletest/tests/actions_loop_test.module
Implements hook_watchdog().
job_scheduler_trigger_worker in sites/all/modules/ulmus/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.module
Fire up a scheduled trigger
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_comment in modules/trigger/trigger.module
Calls action functions for comment triggers.

... See full list

3 string references to 'trigger_get_assigned_actions'
trigger_actions_delete in modules/trigger/trigger.module
Implements hook_actions_delete().
trigger_assign_form_submit in modules/trigger/trigger.admin.inc
Form submission handler for trigger_assign_form().
trigger_unassign_submit in modules/trigger/trigger.admin.inc
Form submission handler for trigger_unassign().

File

modules/trigger/trigger.module, line 188
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];
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.