function shortcut_menu

7.x shortcut.module shortcut_menu()

Implements hook_menu().

File

drupal-7.x/modules/shortcut/shortcut.module, line 69
Allows users to manage customizable lists of shortcut links.

Code

function shortcut_menu() {
  $items['admin/config/user-interface/shortcut'] = array(
    'title' => 'Shortcuts',
    'description' => 'Add and modify shortcut sets.',
    'page callback' => 'shortcut_set_admin',
    'access arguments' => array('administer shortcuts'),
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/add-set'] = array(
    'title' => 'Add shortcut set',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_set_add_form'),
    'access arguments' => array('administer shortcuts'),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/%shortcut_set'] = array(
    'title' => 'Edit shortcuts',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_set_customize', 4),
    'title callback' => 'shortcut_set_title_callback',
    'title arguments' => array(4),
    'access callback' => 'shortcut_set_edit_access',
    'access arguments' => array(4),
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/%shortcut_set/links'] = array(
    'title' => 'List links',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/user-interface/shortcut/%shortcut_set/edit'] = array(
    'title' => 'Edit set name',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_set_edit_form', 4),
    'access callback' => 'shortcut_set_edit_access',
    'access arguments' => array(4),
    'type' => MENU_LOCAL_TASK,
    'file' => 'shortcut.admin.inc',
    'weight' => 10,
  );
  $items['admin/config/user-interface/shortcut/%shortcut_set/delete'] = array(
    'title' => 'Delete shortcut set',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_set_delete_form', 4),
    'access callback' => 'shortcut_set_delete_access',
    'access arguments' => array(4),
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/%shortcut_set/add-link'] = array(
    'title' => 'Add shortcut',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_link_add', 4),
    'access callback' => 'shortcut_set_edit_access',
    'access arguments' => array(4),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/%shortcut_set/add-link-inline'] = array(
    'title' => 'Add shortcut',
    'page callback' => 'shortcut_link_add_inline',
    'page arguments' => array(4),
    'access callback' => 'shortcut_set_edit_access',
    'access arguments' => array(4),
    'type' => MENU_CALLBACK,
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/link/%menu_link'] = array(
    'title' => 'Edit shortcut',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_link_edit', 5),
    'access callback' => 'shortcut_link_access',
    'access arguments' => array(5),
    'file' => 'shortcut.admin.inc',
  );
  $items['admin/config/user-interface/shortcut/link/%menu_link/delete'] = array(
    'title' => 'Delete shortcut',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_link_delete', 5),
    'access callback' => 'shortcut_link_access',
    'access arguments' => array(5),
    'file' => 'shortcut.admin.inc',
  );
  $items['user/%user/shortcuts'] = array(
    'title' => 'Shortcuts',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('shortcut_set_switch', 1),
    'access callback' => 'shortcut_set_switch_access',
    'access arguments' => array(1),
    'type' => MENU_LOCAL_TASK,
    'file' => 'shortcut.admin.inc',
  );

  return $items;
}