function key_menu in Key 7.3
Same name and namespace in other branches
- 7.2 key.module \key_menu()
Implements hook_menu().
File
- ./
key.module, line 27 - Main Key functionality and hook implementations.
Code
function key_menu() {
$items = array();
$items[KEY_MENU_PATH] = array(
'title' => 'Keys',
'description' => 'Manage site-wide keys.',
'page callback' => 'key_configs_list',
'access arguments' => array(
'administer keys',
),
'file' => 'includes/key.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items[KEY_MENU_PATH . '/list'] = array(
'title' => 'List keys',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items[KEY_MENU_PATH . '/add'] = array(
'title' => 'Add key',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'key_config_form',
),
'access arguments' => array(
'administer keys',
),
'file' => 'includes/key.admin.inc',
'type' => MENU_LOCAL_ACTION,
);
$items[KEY_MENU_PATH . '/manage/%key_config'] = array(
'title' => 'Edit key',
'title callback' => 'key_config_edit_title',
'title arguments' => array(
5,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'key_config_form',
5,
),
'access arguments' => array(
'administer keys',
),
'file' => 'includes/key.admin.inc',
);
$items[KEY_MENU_PATH . '/manage/%key_config/delete'] = array(
'title' => 'Delete key',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'key_config_delete_confirm',
5,
),
'access arguments' => array(
'administer keys',
),
'file' => 'includes/key.admin.inc',
);
return $items;
}