You are here

function commerce_order_ui_order_view in Commerce Core 7

Generate an array for rendering the given order.

Parameters

$order: A fully loaded order object.

$view_mode: The view mode for displaying the order, 'administrator' or 'customer'.

Return value

An array as expected by drupal_render().

1 string reference to 'commerce_order_ui_order_view'
commerce_order_ui_menu in modules/order/commerce_order_ui.module
Implements hook_menu().

File

modules/order/commerce_order_ui.module, line 351

Code

function commerce_order_ui_order_view($order, $view_mode = 'administrator') {
  drupal_add_css(drupal_get_path('module', 'commerce_order') . '/theme/commerce_order.theme.css');
  return entity_view('commerce_order', array(
    $order->order_id => $order,
  ), $view_mode, NULL, TRUE);
}