function Rule::evaluate

Overrides RulesActionContainer::evaluate

File

includes/rules.plugins.inc, line 241

Class

Rule
An actual rule.

Code

public function evaluate(RulesState $state) {
    rules_log('Evaluating conditions of rule %label.', array(
        '%label' => $this->label,
    ), RulesLog::INFO, $this);
    if ($this->conditions
        ->evaluate($state)) {
        rules_log('Rule %label fires.', array(
            '%label' => $this->label,
        ), RulesLog::INFO, $this, TRUE);
        parent::evaluate($state);
        rules_log('Rule %label has fired.', array(
            '%label' => $this->label,
        ), RulesLog::INFO, $this, FALSE);
    }
}