You are here

function pm_menu in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pm.module \pm_menu()
  2. 7 pm.module \pm_menu()
  3. 7.2 pm.module \pm_menu()

Implements hook_menu().

1 string reference to 'pm_menu'
pm_block_view in ./pm.module
Implements hook_block_view().

File

./pm.module, line 72
Main module file for the Project Management module.

Code

function pm_menu() {
  $items = array();
  $items['pm'] = array(
    'title' => 'Project Management',
    'description' => 'Access various components of <em>Project Management</em>',
    'page callback' => 'pm_page_front',
    'access arguments' => array(
      'Project Management: access dashboard',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/pm.pages.inc',
  );

  // Configuration group.
  $items['admin/config/pm'] = array(
    'title' => 'Project Management',
    'description' => 'Project Management settings',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'Project Management: access administration pages',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );

  // Project Management settings page (tabs defined below).
  $items['admin/config/pm/pm'] = array(
    'title' => 'General Settings',
    'description' => 'Configure <em>Project Management</em> behaviour across components.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_admin_settings',
    ),
    'access arguments' => array(
      'Project Management: access administration pages',
    ),
    'weight' => -100,
    'file' => 'pm.settings.inc',
    'file path' => drupal_get_path('module', 'pm') . '/includes',
  );

  // Basic settings tab (default).
  $items['admin/config/pm/pm/basic'] = array(
    'title' => 'Basic Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );

  // Permissions tab.
  $items['admin/config/pm/pm/permissions'] = array(
    'title' => 'Permissions',
    'description' => 'Configure access controls based on PM fields.',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_permission_admin',
    ),
    'access arguments' => array(
      'administer pm permission',
    ),
    'file' => 'pm.permission.inc',
    'file path' => drupal_get_path('module', 'pm') . '/includes',
  );
  $items['admin/config/pm/pm/menu'] = array(
    'title' => 'Menu',
    'description' => 'Manage menu exposed in block and on dashboard.',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_menu_list',
    ),
    'access arguments' => array(
      'administer pm permission',
    ),
    'file' => 'pm.menu.inc',
    'file path' => drupal_get_path('module', 'pm') . '/includes',
  );
  $items['admin/config/pm/pm/menu/%'] = array(
    'title' => 'Menu Settings',
    'title callback' => 'pm_menu_admin_title_callback',
    'title arguments' => array(
      5,
    ),
    'description' => 'Manage Dashboard Menu.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_menu_admin',
      5,
    ),
    'access arguments' => array(
      'administer pm permission',
    ),
    'file' => 'pm.menu.inc',
    'file path' => drupal_get_path('module', 'pm') . '/includes',
  );
  return $items;
}