You are here

function patterns_locate_action in Patterns 7

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_locate_action()
  2. 6 patterns.module \patterns_locate_action()
  3. 7.2 includes/core/common.inc \patterns_locate_action()

Scan the actions_map array and return info about the file the action was coming from with the following info:

  • index of the action within the batch_set
  • title of the pattern
  • file of the pattern

Parameters

mixed $key The key of the action in the actions_map array.:

array $actions_map: Array containing information about of all the actions of the batch_set.

Return value

array $result Concise description of the action.

1 call to patterns_locate_action()
patterns_implement_action in includes/core/common.inc
Setup and run an action.

File

includes/core/common.inc, line 369
The common functions used by the Batch and PHP running modes.

Code

function patterns_locate_action($key, $actions_map) {
  $result['key'] = $actions_map['map'][$key]['index'];
  $result['title'] = $actions_map['patterns'][$actions_map['map'][$key]['pid']]['title'];
  $result['file'] = $actions_map['patterns'][$actions_map['map'][$key]['pid']]['file'];
  return $result;
}