actions_actions_map

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 actions_actions_map($actions)

Create an associative array keyed by md5 hashes of function names.

Hashes are used to prevent actual function names from going out into HTML forms and coming back.

Übergabeparameter

$actions An associative array with function names as keys and associative arrays with keys 'description', 'type', etc. as values. Generally the output of actions_list() or actions_get_all_actions() is given as input to this function.

Rückgabewert

An associative array keyed on md5 hash of function names. The value of each key is an associative array of function, description, and type for the action.

▾ 4 functions call actions_actions_map()

system_actions_configure in modules/system/system.module
Menu callback. Create the form for configuration of a single action.
system_actions_manage in modules/system/system.module
Menu callback. Display an overview of available and configured 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.

Code

includes/actions.inc, line 206

<?php
function actions_actions_map($actions) {
  $actions_map = array();
  foreach ($actions as $callback => $array) {
    $key = md5($callback);
    $actions_map[$key]['callback']     = isset($array['callback']) ? $array['callback'] : $callback;
    $actions_map[$key]['description']  = $array['description'];
    $actions_map[$key]['type']         = $array['type'];
    $actions_map[$key]['configurable'] = $array['configurable'];
  }
  return $actions_map;
}
?>

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