You are here

protected function RulesContainerPlugin::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

1 method overrides RulesContainerPlugin::variableInfoAssertions()
Rule::variableInfoAssertions in includes/rules.plugins.inc
Overrides RulesPlugin::variableInfoAssertions().

File

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

Class

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

Code

protected function variableInfoAssertions() {
  $assertions = array();
  foreach ($this->children as $child) {
    if ($add = $child
      ->variableInfoAssertions()) {
      $assertions = rules_update_array($assertions, $add);
    }
  }
  return $assertions;
}