You are here

function commerce_invoice_ui_menu in Commerce Invoice 7

Implements hook_menu().

File

./commerce_invoice_ui.module, line 10

Code

function commerce_invoice_ui_menu() {
  $items = array();
  $items['admin/commerce/config/invoice'] = array(
    'title' => 'Invoice settings',
    'description' => 'Configure general invoice settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_invoice_settings_form',
    ),
    'access arguments' => array(
      'configure invoice settings',
    ),
    'file' => 'includes/commerce_invoice_ui.invoices.inc',
  );
  $items['admin/commerce/config/invoice/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/commerce/orders/%commerce_order/invoice'] = array(
    'title' => 'Invoice',
    'page callback' => 'commerce_invoice_ui_invoice_view_by_order',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'commerce_invoice_ui_access_by_order',
    'access arguments' => array(
      'view',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['user/%user/invoices/%commerce_invoice'] = array(
    'title callback' => 'commerce_invoice_ui_invoice_title',
    'title arguments' => array(
      3,
    ),
    'page callback' => 'commerce_invoice_ui_invoice_view',
    'page arguments' => array(
      3,
      'customer',
      FALSE,
    ),
    'access callback' => 'commerce_invoice_access',
    'access arguments' => array(
      'view',
      3,
    ),
  );
  return $items;
}