function actions_function_lookup

cis7 actions.inc actions_function_lookup($hash)
cle7 actions.inc actions_function_lookup($hash)
elmsmedia7 actions.inc actions_function_lookup($hash)
icor7 actions.inc actions_function_lookup($hash)
meedjum_blog7 actions.inc actions_function_lookup($hash)
mooc7 actions.inc actions_function_lookup($hash)

Returns an action array key (function or ID), given its hash.

Faster than actions_actions_map() when you only need the function name or ID.

Parameters

$hash: Hash of a function name or action ID array key. The array key is a key into the return value of actions_list() (array key is the action function name) or actions_get_all_actions() (array key is the action ID).

Return value

The corresponding array key, or FALSE if no match is found.

8 calls to actions_function_lookup()
system_actions_configure_submit in modules/system/system.admin.inc
Process system_actions_configure() form submissions.
system_actions_configure_validate in modules/system/system.admin.inc
Validate system_actions_configure() form submissions.
token_form_system_actions_configure_alter in sites/all/modules/ulmus/token/token.module
Implements hook_form_FORM_ID_alter().
trigger_assign_form in modules/trigger/trigger.admin.inc
Returns the form for assigning an action to a trigger.
trigger_assign_form_submit in modules/trigger/trigger.admin.inc
Form submission handler for trigger_assign_form().

... See full list

File

includes/actions.inc, line 241
This is the actions engine for executing stored actions.

Code

function actions_function_lookup($hash) {
  // Check for a function name match.
  $actions_list = actions_list();
  foreach ($actions_list as $function => $array) {
    if (drupal_hash_base64($function) == $hash) {
      return $function;
    }
  }
  $aid = FALSE;
  // Must be a configurable action; check database.
  $result = db_query("SELECT aid FROM {actions} WHERE parameters <> ''")->fetchAll(PDO::FETCH_ASSOC);
  foreach ($result as $row) {
    if (drupal_hash_base64($row['aid']) == $hash) {
      $aid = $row['aid'];
      break;
    }
  }
  return $aid;
}
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.