You are here

function commerce_invoice_receipt_menu in Commerce Invoice Receipt 7.2

Same name and namespace in other branches
  1. 7 commerce_invoice_receipt.module \commerce_invoice_receipt_menu()

Implements hook_menu().

File

./commerce_invoice_receipt.module, line 11
Provides a printable invoice receipt along with HTML mailing rules.

Code

function commerce_invoice_receipt_menu() {
  $items['admin/commerce/orders/%commerce_order/view/details'] = array(
    'title' => 'Order details',
    'page callback' => 'commerce_order_ui_order_view',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_admin_order_view_access',
    'access arguments' => array(
      3,
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['admin/commerce/orders/%commerce_order/view/print'] = array(
    'title' => 'Printable invoice',
    'page callback' => 'commerce_invoice_receipt_view_print',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'view',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'parent' => 'admin/commerce/orders/%commerce_order',
  );
  $items['admin/commerce/orders/%commerce_order/view/mail'] = array(
    'title' => 'Email the invoice',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_invoice_receipt_mail_form',
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'view',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'parent' => 'admin/commerce/orders/%commerce_order',
  );
  $items['admin/commerce/orders/%commerce_order/edit/edit'] = array(
    'title' => 'Edit order',
    'page callback' => 'commerce_order_ui_order_form_wrapper',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'update',
      3,
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -5,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'file path' => drupal_get_path('module', 'commerce_order_ui'),
    'file' => 'includes/commerce_order_ui.orders.inc',
  );
  $items['admin/commerce/orders/%commerce_order/edit/print'] = array(
    'title' => 'Printable Invoice',
    'page callback' => 'commerce_invoice_receipt_view_print',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'view',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'parent' => 'admin/commerce/orders/%commerce_order',
  );
  $items['admin/commerce/orders/%commerce_order/edit/mail'] = array(
    'title' => 'Email the invoice',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_invoice_receipt_mail_form',
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'view',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'parent' => 'admin/commerce/orders/%commerce_order',
  );
  $items['user/%user/orders/%commerce_order/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['user/%user/orders/%commerce_order/print'] = array(
    'title' => 'Printable Invoice',
    'page callback' => 'commerce_invoice_receipt_view_print',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_order_customer_order_view_access',
    'access arguments' => array(
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['user/%user/orders/%commerce_order/mail'] = array(
    'title' => 'Email the invoice',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_invoice_receipt_mail_form',
      3,
    ),
    'access callback' => 'commerce_order_access',
    'access arguments' => array(
      'view',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  return $items;
}