You are here

function commerce_backoffice_order_view in Commerce Backoffice 7

Displays the given order using the backoffice view mode, in a megarow.

1 string reference to 'commerce_backoffice_order_view'
commerce_backoffice_order_menu in ./commerce_backoffice_order.module
Implements hook_menu().

File

./commerce_backoffice_order.module, line 45

Code

function commerce_backoffice_order_view($order, $display_id) {
  $title = commerce_order_ui_order_title($order);
  $view = entity_view('commerce_order', array(
    $order->order_id => $order,
  ), 'backoffice');
  $view = $view['commerce_order'][$order->order_id];
  $output = drupal_render($view);
  $return = views_megarow_display($title, $output, $order->order_id);
  if (!empty($view['#megarow_refresh_parent'])) {
    $return['#commands'][] = views_megarow_command_refresh_parent($order->order_id, $display_id);
  }
  return $return;
}