function Rule::stateVariables

Overrides RulesContainerPlugin::stateVariables

File

includes/rules.plugins.inc, line 287

Class

Rule
An actual rule.

Code

protected function stateVariables($element = NULL) {
    // Don't add in provided action variables for the conditions.
    if (isset($element) && $element === $this->conditions) {
        return $this->availableVariables();
    }
    $vars = parent::stateVariables($element);
    // Take variable info assertions of conditions into account.
    if ($assertions = $this->conditions
        ->variableInfoAssertions()) {
        $vars = RulesData::addMetadataAssertions($vars, $assertions);
    }
    return $vars;
}