function RulesCondition::executeCallback

Overrides RulesAbstractPlugin::executeCallback

File

includes/rules.plugins.inc, line 108

Class

RulesCondition
Implements a rules condition.

Code

protected function executeCallback(array $args, RulesState $state = NULL) {
    $return = (bool) $this->__call('execute', empty($this->info['named parameter']) ? $args : array(
        $args,
    ));
    $return = $this->negate ? !$return : $return;
    rules_log('The condition %name evaluated to %bool', array(
        '%name' => $this->label($this->elementName),
        '%bool' => $return ? 'TRUE' : 'FALSE',
    ), RulesLog::INFO, $this);
    return $return;
}