function commerce_order_status_options_list in Commerce Core 7
Wraps commerce_order_status_get_title() for use by the Entity module.
2 string references to 'commerce_order_status_options_list'
- commerce_order_entity_property_info in modules/
order/ commerce_order.info.inc - Implements hook_entity_property_info().
- commerce_order_rules_action_info in modules/
order/ commerce_order.rules.inc - Implements hook_rules_action_info().
File
- modules/
order/ commerce_order.module, line 1222 - Defines the core Commerce order entity and API functions to manage orders and interact with them.
Code
function commerce_order_status_options_list() {
// Build an array of order status options grouped by order state.
$options = array();
foreach (commerce_order_state_get_title() as $name => $title) {
foreach (commerce_order_statuses(array(
'state' => $name,
)) as $order_status) {
$options[check_plain($title)][$order_status['name']] = check_plain($order_status['title']);
}
}
return $options;
}