You are here

function pm_menu in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 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 66
Main module file for the Project Management module.

Code

function pm_menu() {
  $items = array();
  $items['pm'] = array(
    'title' => t('Project Management'),
    'description' => t('You can disable or reorder the links from the !dashboard here', array(
      '!dashboard' => l(t('dashboard'), 'pm'),
    )),
    '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',
  );
  return $items;
}