You are here

function path_menu in Drupal 4

Same name and namespace in other branches
  1. 5 modules/path/path.module \path_menu()
  2. 6 modules/path/path.module \path_menu()
  3. 7 modules/path/path.module \path_menu()

Implementation of hook_menu().

File

modules/path.module, line 48
Enables users to rename URLs.

Code

function path_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/path',
      'title' => t('url aliases'),
      'callback' => 'path_admin',
      'access' => user_access('administer url aliases'),
    );
    $items[] = array(
      'path' => 'admin/path/edit',
      'title' => t('edit alias'),
      'callback' => 'path_admin_edit',
      'access' => user_access('administer url aliases'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/path/delete',
      'title' => t('delete alias'),
      'callback' => 'path_admin_delete_confirm',
      'access' => user_access('administer url aliases'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/path/list',
      'title' => t('list'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/path/add',
      'title' => t('add alias'),
      'callback' => 'path_admin_edit',
      'access' => user_access('administer url aliases'),
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}