actions_list

Definition

actions_list($reset = FALSE)
drupal/includes/actions.inc, line 160

Description

Discovers all available actions by invoking hook_action_info().

This function contrasts with actions_get_all_actions(); see the documentation of actions_get_all_actions() for an explanation.

@see hook_action_info()

Parameters

$reset Reset the action info static cache.

Return value

An associative array keyed on action function name, with the same format as the return value of hook_action_info(), containing all modules' hook_action_info() return values as modified by any hook_action_info_alter() implementations.

Code

function actions_list($reset = FALSE) {
  $actions = &drupal_static(__FUNCTION__);
  if (!isset($actions) || $reset) {
    $actions = module_invoke_all('action_info');
    drupal_alter('action_info', $actions);
  }

  // See module_implements() for an explanation of this cast.
  return (array)$actions;
}