You are here

function uc_order_menu in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_order/uc_order.module \uc_order_menu()
  2. 7.3 uc_order/uc_order.module \uc_order_menu()

Implements hook_menu().

File

uc_order/uc_order.module, line 73

Code

function uc_order_menu() {
  global $user;
  $items = array();
  $items['admin/store/settings/orders'] = array(
    'title' => 'Order settings',
    'description' => 'Configure the order settings.',
    'page callback' => 'uc_order_settings_overview',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/settings/orders/overview'] = array(
    'title' => 'Overview',
    'description' => 'View the order settings.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/store/settings/orders/edit'] = array(
    'title' => 'Edit',
    'description' => 'Edit the order settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/settings/orders/edit/basic'] = array(
    'title' => 'Order settings',
    'description' => 'Edit the basic order settings.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/store/settings/orders/edit/workflow'] = array(
    'title' => 'Order workflow',
    'description' => 'Modify and configure order states and statuses.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_workflow_form',
    ),
    'access arguments' => array(
      'administer order workflow',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/settings/orders/edit/panes'] = array(
    'title' => 'Order panes',
    'description' => 'Edit the pane settings for order pages.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_panes_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/settings/orders/edit/workflow/create'] = array(
    'title' => 'Create an order status',
    'description' => 'Create a custom order status for your store.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_status_create_form',
    ),
    'access arguments' => array(
      'administer order workflow',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders'] = array(
    'title' => 'Orders',
    'description' => 'View and process orders.',
    'page callback' => 'uc_order_admin',
    'page arguments' => array(
      NULL,
      NULL,
      FALSE,
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_NORMAL_ITEM,
    'weight' => -10,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/view'] = array(
    'title' => 'View orders',
    'description' => 'View and process the orders received through your website.',
    'page arguments' => array(
      NULL,
      NULL,
      FALSE,
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_NORMAL_ITEM,
    'weight' => -10,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/sort/%'] = array(
    'title' => 'Orders',
    'description' => 'View orders with a particular order status.',
    'page arguments' => array(
      NULL,
      NULL,
      FALSE,
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/create'] = array(
    'title' => 'Create order',
    'description' => 'Create an empty new order.',
    'page callback' => 'uc_order_create',
    'access arguments' => array(
      'create orders',
    ),
    'type' => MENU_NORMAL_ITEM,
    'weight' => -5,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/create/%user'] = array(
    'title' => 'Create order',
    'description' => 'Create an empty new order.',
    'page callback' => 'uc_order_create',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'create orders',
    ),
    'type' => MENU_NORMAL_ITEM,
    'weight' => -5,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/search'] = array(
    'title' => 'Search orders',
    'description' => 'Search existing orders.',
    'page callback' => 'uc_order_usearch',
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_NORMAL_ITEM,
    'weight' => 0,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/address_book'] = array(
    'title' => 'Select address',
    'page callback' => 'uc_order_address_book',
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/customer'] = array(
    'title' => 'Select customer',
    'page callback' => 'uc_order_select_customer',
    'page arguments' => array(
      NULL,
    ),
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['user/%user/orders'] = array(
    'title' => 'Orders',
    'description' => 'View your order history.',
    'page callback' => 'uc_order_history',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'uc_order_can_view_order',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_order.admin.inc',
  );
  $items['user/%user/order/%uc_order'] = array(
    'title callback' => 'uc_order_page_title',
    'title arguments' => array(
      3,
    ),
    'description' => 'View order.',
    'page callback' => 'uc_order_view',
    'page arguments' => array(
      3,
      'customer',
    ),
    'access callback' => 'uc_order_can_view_order',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['user/%user/order/%uc_order/invoice'] = array(
    'title' => 'View invoice',
    'description' => 'View order invoice.',
    'page callback' => 'uc_order_view',
    'page arguments' => array(
      3,
      'invoice',
    ),
    'access callback' => 'uc_order_can_view_order',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order'] = array(
    'title callback' => 'uc_order_page_title',
    'title arguments' => array(
      3,
    ),
    'description' => 'View order',
    'page callback' => 'uc_order_view',
    'page arguments' => array(
      3,
      'view',
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/store/orders/%uc_order/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_edit_form',
      3,
    ),
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/add_line_item/%'] = array(
    'title' => 'Add a line item',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_add_line_item_form',
      3,
      5,
    ),
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/products'] = array(
    'title' => 'Products',
    'page callback' => 'uc_order_edit_products',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/product_select'] = array(
    'title' => 'Product select',
    'page callback' => 'uc_order_load_product_select',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/add_product/%node'] = array(
    'title' => 'Add product',
    'page callback' => 'uc_order_add_product',
    'page arguments' => array(
      3,
      5,
    ),
    'access arguments' => array(
      'edit orders',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/invoice'] = array(
    'title' => 'Invoice',
    'page callback' => 'uc_order_invoice',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 3,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/invoice/view'] = array(
    'title' => 'View invoice',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/store/orders/%uc_order/invoice/print'] = array(
    'title' => 'Printable invoice',
    'page arguments' => array(
      3,
      'print',
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/invoice/mail'] = array(
    'title' => 'Mail invoice',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_mail_invoice_form',
      3,
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/log'] = array(
    'title' => 'Log',
    'page callback' => 'uc_order_log',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'uc_order_access_order_log',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
    'file' => 'uc_order.admin.inc',
  );
  $items['admin/store/orders/%uc_order/delete'] = array(
    'title' => 'Delete an order',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_order_delete_confirm_form',
      3,
    ),
    'access callback' => 'uc_order_can_delete',
    'access arguments' => array(
      3,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_order.admin.inc',
  );
  return $items;
}