You are here

function pm_menu in Drupal PM (Project Management) 7.2

Same name and namespace in other branches
  1. 8 pm.module \pm_menu()
  2. 7.3 pm.module \pm_menu()
  3. 7 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 46
Main module file for the Project Management module.

Code

function pm_menu() {
  $items = array();
  $dashboard_types = module_invoke_all('pm_dashboard_types');
  foreach ($dashboard_types as $type => $type_info) {
    if (isset($type_info['url'])) {
      $title = isset($type_info['title']) ? $type_info['title'] : 'Project Management Dashboard';
      $items[$type_info['url']] = array(
        'title' => $title,
        'description' => $title,
        'page callback' => 'pm_dashboard',
        'page arguments' => array(
          $type,
        ),
        'access arguments' => array(
          'Project Management: access dashboard',
        ),
        'parent' => '',
        'type' => MENU_NORMAL_ITEM,
      );
      if (isset($type_info['menu_options'])) {
        $items[$type_info['url']] = array_merge($items[$type_info['url']], $type_info['menu_options']);
      }
    }
  }
  $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'),
  );
  $items['admin/config/pm/pm'] = array(
    'title' => 'Project Management',
    'description' => 'Project Management settings including display and taxation.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pm_admin_settings',
    ),
    'access arguments' => array(
      'Project Management: access administration pages',
    ),
    'weight' => -100,
  );
  return $items;
}