You are here

function merci_printable_contract_menu in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

Same name and namespace in other branches
  1. 6.2 modules/merci_printable_contract/merci_printable_contract.module \merci_printable_contract_menu()
  2. 7.3 merci_printable_contract/merci_printable_contract.module \merci_printable_contract_menu()
  3. 7.2 modules/merci_printable_contract/merci_printable_contract.module \merci_printable_contract_menu()

Implements hook_menu().

File

modules/merci_printable_contract/merci_printable_contract.module, line 15
merci_printable_contract functions

Code

function merci_printable_contract_menu() {
  $admin = array(
    'administer MERCI',
  );
  $items['node/%node/contract'] = array(
    'title' => 'Printable contract',
    'description' => 'Takes a node object and returns a printable contract',
    'page arguments' => array(
      1,
    ),
    'page callback' => 'merci_printable_contract',
    'access callback' => 'merci_printable_contract_content_access',
    'access arguments' => array(
      1,
      'manage reservations',
    ),
    'type' => MENU_LOCAL_TASK,
  );

  // Standard Administration settings.
  $items['admin/config/system/merci/contract'] = array(
    'title' => 'Printable Contract',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'merci_printable_contract_admin_settings',
    ),
    'access callback' => 'user_access',
    'access arguments' => $admin,
    'description' => 'Configure settings for MERCI\'s Printable Contract.',
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}