public function RulesConditionalPredicateElement::__construct in Conditional Rules 8
Same name and namespace in other branches
- 7 includes/rules_conditional.core.inc \RulesConditionalPredicateElement::__construct()
File
- includes/
rules_conditional.core.inc, line 402 - Conditional Rules framework implementation.
Class
- RulesConditionalPredicateElement
- Base conditional element that uses a predicate.
Code
public function __construct($predicate = NULL, $settings = array()) {
parent::__construct();
if (isset($predicate)) {
$predicate = is_object($predicate) && $predicate instanceof RulesConditionInterface ? $predicate : rules_condition($predicate, $settings);
$this
->setPredicate($predicate);
}
}