You are here

function rules_admin_rule_proxy::element_get_new_variables in Rules 6

Gets info about all new defined variables by the given element

2 calls to rules_admin_rule_proxy::element_get_new_variables()
rules_admin_rule_proxy::get_new_variables in rules_admin/rules_admin.rule_proxy.inc
Gets the info about all new defined variables in this rule, before the element with the given id
rules_admin_rule_proxy::_get_available_variables in rules_admin/rules_admin.rule_proxy.inc
Gets new variables defined by actions in rules, which are evaluated until this rule.

File

rules_admin/rules_admin.rule_proxy.inc, line 233
Contains the rules proxy class

Class

rules_admin_rule_proxy
This is a smally proxy for the real rule. It provides some useful operations for the admin UI. It builds a small index for the elements of a rule, so that they can be easily identified and modified.

Code

function element_get_new_variables($element) {
  if (isset($element['#type']) && $element['#type'] == 'action') {
    $info = rules_get_element_info($element);
    return $info['new variables'];
  }
  return array();
}