function RulesContainerPlugin::availableVariables

Overrides RulesPlugin::availableVariables

5 calls to RulesContainerPlugin::availableVariables()
Rule::stateVariables in includes/rules.plugins.inc
Returns available state variables for an element.
RulesConditionContainer::stateVariables in includes/rules.core.inc
Overridden to exclude variable assertions of negated conditions.
RulesContainerPlugin::stateVariables in includes/rules.core.inc
Returns available state variables for an element.
RulesEventSet::stateVariables in includes/rules.plugins.inc
Returns available state variables for an element.
RulesOr::stateVariables in includes/rules.plugins.inc
Overrides RulesContainerPlugin::stateVariables().

File

includes/rules.core.inc, line 2281

Class

RulesContainerPlugin
Base class for ContainerPlugins like Rules, Logical Operations or Loops.

Code

public function availableVariables() {
    if (!isset($this->availableVariables)) {
        if ($this->isRoot()) {
            $this->availableVariables = RulesState::defaultVariables();
            if (isset($this->info['variables'])) {
                $this->availableVariables += $this->info['variables'];
            }
        }
        else {
            $this->availableVariables = $this->parent
                ->stateVariables($this);
        }
    }
    return $this->availableVariables;
}