function rules_condition_data_list_count_is

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 417

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;
    }
}