You are here

public function Rule::__construct in Rules 7.2

Overrides RulesActionContainer::__construct

File

includes/rules.plugins.inc, line 176
Contains plugin info and implementations not needed for rule evaluation.

Class

Rule
An actual rule.

Code

public function __construct($variables = array(), $providesVars = array()) {
  parent::__construct($variables, $providesVars);

  // Initialize the conditions container.
  if (!isset($this->conditions)) {
    $this->conditions = rules_and();

    // Don't use setParent() to avoid having it added to the children.
    $this->conditions->parent = $this;
  }
}