You are here

function invoice_menu in Invoice 6

Same name and namespace in other branches
  1. 7 invoice.module \invoice_menu()

Implementation of hook_menu()

File

./invoice.module, line 44
Invoice module

Code

function invoice_menu() {
  $items = array();
  $items['invoices'] = array(
    'title' => 'Invoices',
    'page callback' => 'invoice_invoices',
    'access arguments' => array(
      'access invoices',
    ),
  );
  $items['invoice/set/template'] = array(
    'title' => 'Edit invoice',
    'page callback' => 'invoice_set_template',
    'access arguments' => array(
      'administer invoices',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/print/%'] = array(
    'title' => 'Invoice in HTML print format',
    'page callback' => 'invoice_view_print',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access invoices',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/pdf/%'] = array(
    'title' => 'Invoice in PDF format',
    'page callback' => 'invoice_view_pdf',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access invoices',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/set/pay_status/%/%'] = array(
    'title' => 'Set invoice pay status',
    'page callback' => 'invoice_set_pay_status',
    'page arguments' => array(
      3,
      4,
    ),
    'access arguments' => array(
      'administer invoices',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/search/customer'] = array(
    'title' => 'Search customer',
    'page callback' => 'invoice_search_customer',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'invoice_user_access_handler',
    'access arguments' => array(
      array(
        'administer invoices',
        'administer own invoices',
      ),
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/get/customer_info'] = array(
    'title' => 'Get customer info',
    'page callback' => 'invoice_get_customer_info',
    'access callback' => 'invoice_user_access_handler',
    'access arguments' => array(
      array(
        'administer invoices',
        'administer own invoices',
      ),
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/save/item'] = array(
    'title' => 'Save item',
    'page callback' => 'invoice_save_item',
    'access callback' => 'invoice_user_access_handler',
    'access arguments' => array(
      array(
        'administer invoices',
        'administer own invoices',
      ),
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/edit/item'] = array(
    'title' => 'Edit item',
    'page callback' => 'invoice_edit_item',
    'access callback' => 'invoice_user_access_handler',
    'access arguments' => array(
      array(
        'administer invoices',
        'administer own invoices',
      ),
    ),
    'type' => MENU_CALLBACK,
  );
  $items['invoice/delete/item'] = array(
    'title' => 'Delete item',
    'page callback' => 'invoice_delete_item',
    'access callback' => 'invoice_user_access_handler',
    'access arguments' => array(
      array(
        'administer invoices',
        'administer own invoices',
      ),
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/invoice'] = array(
    'title' => 'Invoice',
    'page callback' => 'invoice_settings',
    'access arguments' => array(
      'administer invoices',
    ),
    'description' => 'Create and manage invoices.',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['invoice/installed_locales'] = array(
    'title' => 'Installed locales on your system',
    'page callback' => 'invoice_installed_locales',
    'access arguments' => array(
      'administer invoices',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}