You are here

function rules_execute_and in Rules 6

Execution handler for the AND element Evaluates to TRUE if all children evaluate to TRUE..

1 call to rules_execute_and()
rules_evaluate_elements in rules/rules.module
Evaluates the elements in a recursive way The elements are a tree of rules, conditions, actions and logical operations (AND, OR,..)
1 string reference to 'rules_execute_and'
rules_elements in rules/rules.module
Implementation of hook_elements() Defines default values for all available properties of rules's element types

File

rules/rules.module, line 441
Rules engine module

Code

function rules_execute_and(&$elements, &$state) {
  foreach (element_children($elements) as $key) {
    $result = rules_evaluate_elements($elements[$key], $state);
    if ($result === FALSE) {
      return FALSE;
    }
  }
  return TRUE;
}