You are here

protected function RulesOr::stateVariables in Rules 7.2

Overrides RulesContainerPlugin::stateVariables().

Overridden to exclude all variable assertions as in an OR we cannot assert the children are successfully evaluated.

Overrides RulesConditionContainer::stateVariables

File

includes/rules.plugins.inc, line 639
Contains plugin info and implementations not needed for rule evaluation.

Class

RulesOr
A logical OR.

Code

protected function stateVariables($element = NULL) {
  $vars = $this
    ->availableVariables();
  if (isset($element)) {

    // Add in variables provided by siblings executed before the element.
    foreach ($this->children as $child) {
      if ($child === $element) {
        break;
      }
      $vars += $child
        ->providesVariables();
    }
  }
  return $vars;
}