function rules_condition_number_compare in Rules 6
Condition implementation: Numeric comparison.
Related topics
1 string reference to 'rules_condition_number_compare'
- workflow_ng_condition_token_numeric_upgrade in rules/
modules/ rules.rules_forms.inc
File
- rules/
modules/ rules.rules.inc, line 182 - rules integration for the rules module
Code
function rules_condition_number_compare($number1, $number2, $settings) {
switch ($settings['operation']) {
case 'greater':
return $number1 > $number2;
case 'equal':
return $number1 == $number2;
case 'less':
return $number1 < $number2;
}
}