You are here

protected function RulesConditionalPredicateElement::setPredicate in Conditional Rules 8

Same name and namespace in other branches
  1. 7 includes/rules_conditional.core.inc \RulesConditionalPredicateElement::setPredicate()

Sets a condition as predicate.

2 calls to RulesConditionalPredicateElement::setPredicate()
RulesConditionalPredicateElement::importPredicate in includes/rules_conditional.core.inc
Imports predicate.
RulesConditionalPredicateElement::__construct in includes/rules_conditional.core.inc

File

includes/rules_conditional.core.inc, line 413
Conditional Rules framework implementation.

Class

RulesConditionalPredicateElement
Base conditional element that uses a predicate.

Code

protected function setPredicate($predicate) {
  $this->predicate = $predicate;
  $this->predicate->parent = $this;

  // Set up variables with the new parent.
  $this
    ->resetInternalCache();
}