function commerce_billy_pdf_menu in Commerce Billy 7
Implements hook_menu().
File
- modules/
commerce_billy_pdf/ commerce_billy_pdf.module, line 11 - Commerce Billy module file.
Code
function commerce_billy_pdf_menu() {
$items['invoice-pdf/%commerce_order'] = array(
'title' => 'Invoice',
'page callback' => 'commerce_billy_pdf',
'page arguments' => array(
1,
),
'access callback' => 'commerce_billy_pdf_view_access',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
// Add a HTML version of the invoice for easier debugging for themers and
// printing.
$items['invoice-pdf/%commerce_order/print'] = array(
'title' => 'HTML Invoice',
'page callback' => 'commerce_billy_pdf_html_page',
'page arguments' => array(
1,
),
'access callback' => 'commerce_billy_pdf_view_access',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
$items['admin/commerce/config/billy-invoice/pdf'] = array(
'title' => 'PDF',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'commerce_billy_pdf_admin_form',
),
'access arguments' => array(
'configure order settings',
),
'type' => MENU_LOCAL_TASK,
'file' => 'commerce_billy_pdf.admin.inc',
);
$items['admin/commerce/orders/%commerce_order/pdf-invoice'] = array(
'title' => 'Invoice (PDF)',
'page callback' => 'commerce_billy_pdf',
'page arguments' => array(
3,
),
'access callback' => 'commerce_billy_pdf_view_access',
'access arguments' => array(
3,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 10,
);
return $items;
}