function commerce_order_uri in Commerce Core 7
Entity uri callback: gives modules a chance to specify a path for an order.
2 calls to commerce_order_uri()
- commerce_order_ui_order_uri in modules/
order/ commerce_order_ui.module - Entity uri callback: points to the admin view page of the given order.
- commerce_order_ui_tokens in modules/
order/ commerce_order_ui.tokens.inc - Implements hook_tokens().
1 string reference to 'commerce_order_uri'
- commerce_order_entity_info in modules/
order/ commerce_order.module - Implements hook_entity_info().
File
- modules/
order/ commerce_order.module, line 70 - Defines the core Commerce order entity and API functions to manage orders and interact with them.
Code
function commerce_order_uri($order) {
// Allow modules to specify a path, returning the first one found.
foreach (module_implements('commerce_order_uri') as $module) {
$uri = module_invoke($module, 'commerce_order_uri', $order);
// If the implementation returned data, use that now.
if (!empty($uri)) {
return $uri;
}
}
return NULL;
}