You are here

function rules_condition_data_list_count_is in Rules 7.2

Condition: List count comparison.

Related topics

1 string reference to 'rules_condition_data_list_count_is'
rules_data_condition_info in modules/data.rules.inc
Implements hook_rules_condition_info() on behalf of the pseudo data module.

File

modules/data.eval.inc, line 409
Contains rules integration for the data module needed during evaluation.

Code

function rules_condition_data_list_count_is($list, $op, $value) {
  switch ($op) {
    case '==':
      return count($list) == $value;
    case '<':
      return count($list) < $value;
    case '>':
      return count($list) > $value;
  }
}