You are here

function commerce_invoice_pdf_menu in Commerce Invoice 7.2

Implements hook_menu().

File

modules/pdf/commerce_invoice_pdf.module, line 13
The Commerce Invoice PDF module.

Code

function commerce_invoice_pdf_menu() {
  $items = [];
  $items['invoices/%entity_object/pdf'] = [
    'title' => 'PDF',
    'load arguments' => [
      'commerce_invoice',
    ],
    'page callback' => 'commerce_invoice_pdf_deliver',
    'page arguments' => [
      1,
    ],
    'access callback' => 'entity_access',
    'access arguments' => [
      'view',
      'commerce_invoice',
      1,
    ],
    'type' => MENU_CALLBACK,
  ];
  $items['invoices/%entity_object/pdf/html'] = [
    'title' => 'PDF - HTML source',
    'load arguments' => [
      'commerce_invoice',
    ],
    'page callback' => 'commerce_invoice_pdf_html',
    'page arguments' => [
      1,
    ],
    'access arguments' => [
      'administer commerce_invoice entities',
    ],
    'type' => MENU_CALLBACK,
  ];
  return $items;
}