You are here

function path_menu in Drupal 5

Same name and namespace in other branches
  1. 4 modules/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/path.module, line 37
Enables users to rename URLs.

Code

function path_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/build/path',
      'title' => t('URL aliases'),
      'description' => t('Change your site\'s URL paths by aliasing them.'),
      'callback' => 'path_admin',
      'access' => user_access('administer url aliases'),
    );
    $items[] = array(
      'path' => 'admin/build/path/edit',
      'title' => t('Edit alias'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'path_admin_edit',
      ),
      'access' => user_access('administer url aliases'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/path/delete',
      'title' => t('Delete alias'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'path_admin_delete_confirm',
      ),
      'access' => user_access('administer url aliases'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/path/list',
      'title' => t('List'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/build/path/add',
      'title' => t('Add alias'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'path_admin_edit',
      ),
      'access' => user_access('administer url aliases'),
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}