function rules_action_variable_add_info_alter
Info alteration callback for variable add action.
Related topics
File
-
modules/
data.eval.inc, line 179
Code
function rules_action_variable_add_info_alter(&$element_info, RulesAbstractPlugin $element) {
if (isset($element->settings['type']) && ($type = $element->settings['type'])) {
$cache = rules_get_cache();
$type_info = $cache['data_info'][$type];
$element_info['parameter']['value']['type'] = $type;
$element_info['provides']['variable_added']['type'] = $type;
// For lists, we default to an empty list so subsequent actions can add
// items.
if (entity_property_list_extract_type($type)) {
$element_info['parameter']['value']['default value'] = array();
}
}
}