function RulesPlugin::availableVariables

Returns info about variables available to be used as arguments for this element.

As this is called very often, e.g. during integrity checks, we statically cache the results.

See also

RulesPlugin::resetInternalCache()

3 calls to RulesPlugin::availableVariables()
RulesPlugin::applyDataSelector in includes/rules.core.inc
Applies the given data selector.
RulesPlugin::getArgumentInfo in includes/rules.core.inc
Returns info about the configured argument.
RulesPlugin::processSettings in includes/rules.core.inc
Processes the settings e.g. to prepare input evaluators.
1 method overrides RulesPlugin::availableVariables()
RulesContainerPlugin::availableVariables in includes/rules.core.inc
Returns info about variables available to be used as arguments for this element.

File

includes/rules.core.inc, line 768

Class

RulesPlugin
Base class for rules plugins.

Code

public function availableVariables() {
    if (!isset($this->availableVariables)) {
        $this->availableVariables = !$this->isRoot() ? $this->parent
            ->stateVariables($this) : RulesState::defaultVariables();
    }
    return $this->availableVariables;
}