menu_menu

Versions
4.6 – 5
menu_menu($may_cache)
6 – 7
menu_menu()

Implementation of hook_menu().

Code

modules/menu.module, line 47

<?php
function menu_menu($may_cache) {
  $items = array();

  if ($may_cache) {
    $items[] = array('path' => 'admin/menu',
      'title' => t('menus'),
      'callback' => 'menu_overview',
      'access' => user_access('administer menu'));
    $items[] = array('path' => 'admin/menu/list',
      'title' => t('list'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10);

    $items[] = array('path' => 'admin/menu/item/add',
      'title' => t('add menu item'),
      'callback' => 'menu_edit_item_form',
      'access' => user_access('administer menu'),
      'type' => MENU_LOCAL_TASK);
    $items[] = array('path' => 'admin/menu/item/edit',
      'title' => t('edit menu item'),
      'callback' => 'menu_edit_item_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'admin/menu/item/reset',
      'title' => t('reset menu item'),
      'callback' => 'menu_reset_item',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'admin/menu/item/disable',
      'title' => t('disable menu item'),
      'callback' => 'menu_disable_item',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'admin/menu/item/delete',
      'title' => t('delete menu item'),
      'callback' => 'menu_item_delete_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK);

    $items[] = array('path' => 'admin/menu/menu/add',
      'title' => t('add menu'),
      'callback' => 'menu_edit_menu_form',
      'access' => user_access('administer menu'),
      'type' => MENU_LOCAL_TASK);
    $items[] = array('path' => 'admin/menu/menu/edit',
      'title' => t('edit menu'),
      'callback' => 'menu_edit_menu_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'admin/menu/menu/delete',
      'title' => t('delete menu'),
      'callback' => 'menu_item_delete_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK);

    $items[] = array('path' => 'admin/settings/menu',
      'title' => t('menus'),
      'callback' => 'menu_configure');
  }

  return $items;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.