You are here

function casetracker_menu in Case Tracker 6

Same name and namespace in other branches
  1. 5 casetracker.module \casetracker_menu()
  2. 7.2 casetracker.module \casetracker_menu()
  3. 7 casetracker.module \casetracker_menu()

Implementation of hook_menu().

File

./casetracker.module, line 52
Enables the handling of projects and their cases.

Code

function casetracker_menu() {

  /* casetracker main settings */
  $items['admin/settings/casetracker'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'casetracker_settings',
    ),
    'description' => 'Configure the various Case Tracker options with these settings.',
    'title' => 'Case Tracker',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/settings/casetracker/settings'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'casetracker_settings',
    ),
    'title' => 'Settings',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );

  /* casetracker state handling */
  $items['admin/settings/casetracker/states'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'casetracker_case_state_overview',
    'type' => MENU_LOCAL_TASK,
    'title' => 'Case states',
    'description' => 'Add, edit and delete Case States, Types and Priorities',
  );
  $items['admin/settings/casetracker/states/list'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'casetracker_case_state_overview',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'title' => 'Overview',
    'weight' => -10,
    'description' => 'Add, edit and delete Case States, Types and Priorities',
  );
  $items['admin/settings/casetracker/states/add'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'casetracker_case_state_edit',
    ),
    'title' => 'Add case state',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/casetracker/states/edit/%casetracker_case_state'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'casetracker_case_state_edit',
      5,
    ),
    'title' => 'Edit case state',
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/casetracker/states/delete/%casetracker_case_state'] = array(
    'file' => 'casetracker_admin.inc',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'casetracker_case_state_confirm_delete',
      5,
    ),
    'title' => 'Delete case state',
    'type' => MENU_CALLBACK,
  );

  /* casetracker autocomplete */
  $items['casetracker_autocomplete'] = array(
    'title' => 'Case Tracker autocomplete',
    'page callback' => 'casetracker_autocomplete',
    'access callback' => 'user_access',
    'access arguments' => array(
      'assign cases',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}