You are here

public function RulesPlugin::providesVariables in Rules 7.2

Returns info about all variables provided for later evaluated elements.

See also

self::pluginProvidesVariables()

5 calls to RulesPlugin::providesVariables()
RulesAbstractPlugin::exportToArray in includes/rules.core.inc
RulesActionContainer::providesVariables in includes/rules.core.inc
Returns info about all variables provided for later evaluated elements.
RulesContainerPlugin::exportFlat in includes/rules.core.inc
Determines whether the element should be exported in flat style.
RulesPlugin::exportSettings in includes/rules.core.inc
RulesPlugin::returnVariables in includes/rules.core.inc
Gets variables to return once the configuration has been executed.
2 methods override RulesPlugin::providesVariables()
RulesActionContainer::providesVariables in includes/rules.core.inc
Returns info about all variables provided for later evaluated elements.
RulesCondition::providesVariables in includes/rules.plugins.inc
Returns info about all variables provided for later evaluated elements.

File

includes/rules.core.inc, line 673
Rules base classes and interfaces needed for any rule evaluation.

Class

RulesPlugin
Base class for rules plugins.

Code

public function providesVariables() {
  foreach ($this
    ->pluginProvidesVariables() as $name => $info) {
    $info['source name'] = $name;
    $info['label'] = isset($this->settings[$name . ':label']) ? $this->settings[$name . ':label'] : $info['label'];
    if (isset($this->settings[$name . ':var'])) {
      $name = $this->settings[$name . ':var'];
    }
    $provides[$name] = $info;
  }
  return isset($provides) ? $provides : array();
}