function RulesOr::stateVariables
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
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;
}