actions_get_all_actions

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 actions_get_all_actions()

Retrieve all action instances from the database.

Compare with actions_list() which gathers actions by invoking hook_action_info(). The two are synchronized by visiting /admin/build/actions (when actions.module is enabled) which runs actions_synchronize().

Rückgabewert

Associative array keyed by action ID. Each value is an associative array with keys 'callback', 'description', 'type' and 'configurable'.

▾ 4 functions call actions_get_all_actions()

trigger_assign_form in modules/trigger/trigger.admin.inc
Create the form definition for assigning an action to a hook-op combination.
trigger_options in modules/trigger/trigger.module
Often we generate a select field of all actions. This function generates the options for that select.
trigger_unassign in modules/trigger/trigger.admin.inc
Confirm removal of an assigned action.
trigger_unassign_submit in modules/trigger/trigger.admin.inc

Code

includes/actions.inc, line 179

<?php
function actions_get_all_actions() {
  $actions = db_query("SELECT aid, type, callback, parameters, description FROM {actions}")->fetchAllAssoc('aid', PDO::FETCH_ASSOC);
  foreach ($actions as &$action) {
    $action['configurable'] = (bool) $action['parameters'];
    unset($action['parameters']);
    unset($action['aid']);
  }
  return $actions;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen