function rules_get_mapped_argument_names in Rules 6
Gets the argument map, mapping the specified arguments of an element to the variable names of the currently evaluated set.
Parameters
$element The configured element, which variables to map:
$state The current evaluation state:
Return value
The argument map.
4 calls to rules_get_mapped_argument_names()
- rules_action_invoke_set in rules/
modules/ rules.rules.inc - Base action implementation for invoking all rule sets.
- rules_action_save_variable in rules/
modules/ rules.rules.inc - Base action implementation for adding a new variable and saving variables.
- rules_admin_get_argument_labels in rules_admin/
rules_admin.inc - Gets the labels of the variables, which are configured to be passed as arguments to the given element.
- rules_get_element_arguments in rules/
rules.variables.inc - Gets the arguments as defined by the element.
File
- rules/
rules.variables.inc, line 131 - Provides functions and classes for handling variables
Code
function rules_get_mapped_argument_names($element) {
$element['#settings'] += array(
'#argument map' => array(),
);
$map = $element['#settings']['#argument map'];
if ($element_info = rules_get_element_info($element)) {
// Initialize the map with default mappings (name => name).
return $map + drupal_map_assoc(array_keys($element_info['arguments']));
}
return $map;
}