function uc_order_condition_has_product_class_classes_options in Ubercart 7.3
Same name and namespace in other branches
- 8.4 uc_order/uc_order.rules.inc \uc_order_condition_has_product_class_classes_options()
Options callback.
Return value
array Associative array of all Ubercart product classes indexed by class ID.
See also
uc_order_condition_has_product_class()
1 string reference to 'uc_order_condition_has_product_class_classes_options'
- uc_order_rules_condition_info in uc_order/
uc_order.rules.inc - Implements hook_rules_condition_info().
File
- uc_order/
uc_order.rules.inc, line 521 - Hooks and functions for uc_order Rules integration.
Code
function uc_order_condition_has_product_class_classes_options() {
$options = array();
$result = db_query('SELECT * FROM {uc_product_classes}');
foreach ($result as $class) {
$options += array(
$class->pcid => $class->name,
);
}
return $options;
}