function commerce_registration_registration_slot_comparison in Commerce Registration 7.3
Condition callback. Compare the total slots on a registration.
Related topics
File
- ./
commerce_registration.rules.inc, line 224 - Commerce Registration rules file.
Code
function commerce_registration_registration_slot_comparison($registration, $operator, $amount) {
$total = $registration->count;
switch ($operator) {
case '=':
return $total == $amount;
case '>=':
return $total >= $amount;
case '>':
return $total > $amount;
case '<':
return $total < $amount;
case '<=':
return $total <= $amount;
case '!=':
return $total != $amount;
}
return FALSE;
}