function actions_get_all_actions
7.x actions.inc | actions_get_all_actions() |
6.x actions.inc | actions_get_all_actions() |
Retrieves all action instances from the database.
Compare with actions_list(), which gathers actions by invoking hook_action_info(). The actions returned by this function and the actions returned by actions_list() are partially synchronized. Non-configurable actions from hook_action_info() implementations are put into the database when actions_synchronize() is called, which happens when admin/settings/actions is visited. Configurable actions are not added to the database until they are configured in the user interface, in which case a database row is created for each configuration of each action.
Return value
Associative array keyed by action ID. Each value is an associative array with keys 'callback', 'description', 'type' and 'configurable'.
4 calls to actions_get_all_actions()
- trigger_assign_form in drupal-6.x/
modules/ trigger/ trigger.admin.inc - Create the form definition for assigning an action to a hook-op combination.
- trigger_options in drupal-6.x/
modules/ trigger/ trigger.module - Often we generate a select field of all actions. This function generates the options for that select.
- trigger_unassign in drupal-6.x/
modules/ trigger/ trigger.admin.inc - Confirm removal of an assigned action.
- trigger_unassign_submit in drupal-6.x/
modules/ trigger/ trigger.admin.inc
File
- drupal-6.x/
includes/ actions.inc, line 214 - This is the actions engine for executing stored actions.
Code
function actions_get_all_actions() {
$actions = array();
$result = db_query("SELECT * FROM {actions}");
while ($action = db_fetch_object($result)) {
$actions[$action->aid] = array(
'callback' => $action->callback,
'description' => $action->description,
'type' => $action->type,
'configurable' => (bool) $action->parameters,
);
}
return $actions;
}