You are here

protected function RulesAbstractPlugin::variableInfoAssertions in Rules 7.2

Returns asserted additions to the available variable info.

Any returned info is merged into the variable info, in case the execution flow passes the element. E.g. this is used to assert the content type of a node if the condition is met, such that the per-node type properties are available.

Overrides RulesPlugin::variableInfoAssertions

File

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

Class

RulesAbstractPlugin
Defines a common base class for so-called "Abstract Plugins" like actions.

Code

protected function variableInfoAssertions() {

  // Get the implementation's assertions and map them to the variable names.
  if ($assertions = $this
    ->__call('assertions')) {
    foreach ($assertions as $param_name => $data) {
      $name = isset($this->settings[$param_name . ':select']) ? $this->settings[$param_name . ':select'] : $param_name;
      $return[$name] = $data;
    }
    return $return;
  }
}