You are here

function rules_get_element_variable in Rules 6

Gets a variable for the given element which uses an own input form.

Parameters

$element: The element to get the variable for.

$name: The name of the variable to get.

Return value

The variable, if available.

1 call to rules_get_element_variable()
rules_get_element_arguments in rules/rules.variables.inc
Gets the arguments as defined by the element.

File

rules/rules.variables.inc, line 115
Provides functions and classes for handling variables

Code

function rules_get_element_variable($element, $name) {
  if (isset($element['#settings'][$name]) && isset($element['#info']['arguments'][$name])) {
    $object = rules_get_data_object($element['#info']['arguments'][$name]);
    return $object
      ->check_value($element['#info']['arguments'][$name], $element['#settings'][$name]);
  }
}