You are here

function unused_modules_menu in Unused Modules 7

Same name and namespace in other branches
  1. 6 unused_modules.module \unused_modules_menu()

Implements hook_menu().

File

./unused_modules.module, line 20
This module lists modules and projects that are unused.

Code

function unused_modules_menu() {

  // Base path.
  $items['admin/config/development/unused_modules'] = array(
    'title' => 'Unused Modules',
    'description' => 'Show projects that are unused',
    'page callback' => 'unused_modules_show_projects',
    'page arguments' => array(
      'disabled',
    ),
    'access arguments' => array(
      'administer modules',
    ),
  );

  // Projects.
  $items['admin/config/development/unused_modules/projects'] = array(
    'title' => 'Projects',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/config/development/unused_modules/projects/disabled'] = array(
    'title' => 'Fully disabled',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/config/development/unused_modules/projects/all'] = array(
    'title' => 'Also enabled',
    'description' => 'Show projects that are unused',
    'page callback' => 'unused_modules_show_projects',
    'page arguments' => array(
      'all',
    ),
    'access arguments' => array(
      'administer modules',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );

  // Modules.
  $items['admin/config/development/unused_modules/modules'] = array(
    'title' => 'Modules',
    'description' => 'Show modules that are unused',
    'page callback' => 'unused_modules_show_modules',
    'page arguments' => array(
      'disabled',
    ),
    'access arguments' => array(
      'administer modules',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/config/development/unused_modules/modules/disabled'] = array(
    'title' => 'Fully disabled',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/config/development/unused_modules/modules/all'] = array(
    'title' => 'Also enabled',
    'description' => 'Show modules that are unused',
    'page callback' => 'unused_modules_show_modules',
    'page arguments' => array(
      'all',
    ),
    'access arguments' => array(
      'administer modules',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  return $items;
}