function commerce_invoice_menu in Commerce Invoice 7.2
Implements hook_menu().
File
- ./
commerce_invoice.module, line 384 - The Commerce Invoice module.
Code
function commerce_invoice_menu() {
$items = [];
$items['admin/commerce/config/invoice'] = [
'title' => 'Invoice settings',
'description' => 'Configure fields and other settings for invoices.',
'page callback' => 'drupal_get_form',
'page arguments' => [
'commerce_invoice_settings_form',
],
'access arguments' => [
'administer commerce_invoice entities',
],
'file' => 'commerce_invoice.admin.inc',
];
$items['invoices/%entity_object'] = [
'load arguments' => [
'commerce_invoice',
],
'title callback' => 'commerce_invoice_title',
'title arguments' => [
1,
],
'page callback' => 'entity_ui_entity_page_view',
'page arguments' => [
1,
],
'access callback' => 'entity_access',
'access arguments' => [
'view',
'commerce_invoice',
1,
],
];
$items['admin/commerce/orders/%/invoices/create'] = [
'title' => 'Create invoice',
'description' => 'Create an invoice for the given order.',
'page callback' => 'drupal_get_form',
'page arguments' => [
'commerce_invoice_create_from_order_form',
3,
],
'access arguments' => [
'administer commerce_invoice entities',
],
'file' => 'commerce_invoice.admin.inc',
'type' => MENU_LOCAL_ACTION,
];
return $items;
}