You are here

function commerce_order_ui_menu in Commerce Core 7

Implements hook_menu().

File

modules/order/commerce_order_ui.module, line 10

Code

function commerce_order_ui_menu() {
  $items = array();

  // Note: admin/commerce/orders is defined by a default View.
  // Create an order.
  $items['admin/commerce/orders/add'] = array(
    'title' => 'Create an order',
    'description' => 'Create a new order.',
    'page callback' => 'commerce_order_ui_order_form_wrapper',
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'create',
    ),
    'weight' => 10,
    'file' => 'includes/commerce_order_ui.orders.inc',
  );
  $items['admin/commerce/orders/add/%user'] = array(
    'title' => 'Create an order',
    'description' => 'Create a new order for the specified user.',
    'page callback' => 'commerce_order_ui_order_form_wrapper',
    'page arguments' => array(
      NULL,
      4,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'create',
    ),
    'file' => 'includes/commerce_order_ui.orders.inc',
  );
  $items['admin/commerce/orders/%commerce_order'] = array(
    'title callback' => 'commerce_order_ui_order_title',
    'title arguments' => array(
      3,
    ),
    'page callback' => 'commerce_order_ui_order_view',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_admin_order_view_access',
    'access arguments' => array(
      3,
    ),
  );
  $items['admin/commerce/orders/%commerce_order/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['admin/commerce/orders/%commerce_order/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'commerce_order_ui_order_form_wrapper',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'update',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'file' => 'includes/commerce_order_ui.orders.inc',
  );
  $items['admin/commerce/orders/%commerce_order/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'commerce_order_ui_order_delete_form_wrapper',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'delete',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 20,
    'context' => MENU_CONTEXT_INLINE,
    'file' => 'includes/commerce_order_ui.orders.inc',
  );
  $items['admin/commerce/config/order'] = array(
    'title' => 'Order settings',
    'description' => 'Configure general order settings, fields, and displays.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_order_settings_form',
    ),
    'access arguments' => array(
      'configure order settings',
    ),
    'file' => 'includes/commerce_order_ui.orders.inc',
  );
  $items['admin/commerce/config/order/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['user/%user/orders/%commerce_order'] = array(
    'title callback' => 'commerce_order_ui_order_title',
    'title arguments' => array(
      3,
    ),
    'page callback' => 'commerce_order_ui_order_view',
    'page arguments' => array(
      3,
      'customer',
    ),
    'access callback' => 'commerce_order_customer_order_view_access',
    'access arguments' => array(
      3,
    ),
  );
  return $items;
}