function uc_order_menu in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_order/uc_order.module \uc_order_menu()
- 6.2 uc_order/uc_order.module \uc_order_menu()
Implements hook_menu().
File
- uc_order/
uc_order.module, line 101
Code
function uc_order_menu() {
global $user;
$items = array();
$items['admin/store/customers'] = array(
'title' => 'Customers',
'description' => 'View and search customer information.',
'page callback' => 'uc_order_customers',
'access arguments' => array(
'view customers',
),
'weight' => -6,
'position' => 'left',
'file' => 'uc_order.admin.inc',
);
// admin/store/customers/view is provided by Views.
// admin/store/customers/orders/% is provided by Views.
$items['admin/store/settings/orders'] = array(
'title' => 'Orders',
'description' => 'Configure the display and workflow for orders.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_order_settings_form',
),
'access arguments' => array(
'administer store',
),
'file' => 'uc_order.admin.inc',
);
$items['admin/store/settings/orders/settings'] = array(
'title' => 'Settings',
'description' => 'Edit the basic order settings.',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/store/settings/orders/workflow'] = array(
'title' => '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' => -8,
'file' => 'uc_order.admin.inc',
);
$items['admin/store/settings/orders/workflow/create'] = array(
'title' => 'Create custom 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_LOCAL_ACTION,
'file' => 'uc_order.admin.inc',
);
$items['admin/store/orders'] = array(
'title' => 'Orders',
'description' => 'View and process orders.',
'page callback' => 'uc_order_orders',
'access arguments' => array(
'view all orders',
),
'weight' => -10,
'position' => 'left',
'file' => 'uc_order.admin.inc',
);
// admin/store/orders/view is provided by Views.
$items['admin/store/orders/create'] = array(
'title' => 'Create order',
'description' => 'Create an empty new order.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_order_create_form',
),
'access arguments' => array(
'create orders',
),
'weight' => -5,
'file' => 'uc_order.admin.inc',
);
$items['admin/store/orders/create/%user'] = array(
'title' => 'Create order for this customer',
'description' => 'Create an empty new order.',
'page callback' => 'uc_order_create_for_user',
'page arguments' => array(
4,
),
'access arguments' => array(
'create orders',
),
'file' => 'uc_order.admin.inc',
);
// admin/store/orders/search is provided by Views.
$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',
);
// user/%/orders is provided by Views.
$items['user/%user/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,
'customer',
),
'access callback' => 'uc_order_can_view_order',
'access arguments' => array(
1,
3,
),
);
$items['user/%user/orders/%uc_order/invoice'] = array(
'title' => 'View invoice',
'description' => 'View order invoice.',
'page callback' => 'uc_order_view_invoice',
'page arguments' => array(
3,
),
'access callback' => 'uc_order_can_view_order',
'access arguments' => array(
1,
3,
TRUE,
),
);
$items['user/%user/orders/%uc_order/print'] = array(
'title' => 'Print invoice',
'description' => 'Print order invoice.',
'page callback' => 'uc_order_view_invoice',
'page arguments' => array(
3,
TRUE,
),
'access callback' => 'uc_order_can_view_order',
'access arguments' => array(
1,
3,
TRUE,
),
);
$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',
),
'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/invoice'] = array(
'title' => 'Invoice',
'page callback' => 'uc_order_view_invoice',
'page arguments' => array(
3,
),
'access arguments' => array(
'view all orders',
),
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
$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,
TRUE,
),
'access arguments' => array(
'view all orders',
),
'type' => MENU_LOCAL_TASK,
'weight' => -5,
);
$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 arguments' => array(
'view all orders',
),
'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,
),
'file' => 'uc_order.admin.inc',
);
return $items;
}