You are here

function key_ui_menu in Key 7

Implements hook_menu().

File

modules/key_ui/key_ui.module, line 8

Code

function key_ui_menu() {
  $items = array();
  $items[KEY_MENU_PATH] = array(
    'title' => 'Keys',
    'description' => 'Manage keys.',
    'page callback' => 'key_ui_key_configs_list',
    'access arguments' => array(
      'administer keys',
    ),
    'file' => 'includes/key_ui.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_ui_key_config_form',
    ),
    'access arguments' => array(
      'administer keys',
    ),
    'file' => 'includes/key_ui.admin.inc',
    'type' => MENU_LOCAL_ACTION,
  );
  $items[KEY_MENU_PATH . '/edit/%key_ui_config'] = array(
    'title' => 'Edit key',
    'title callback' => 'key_ui_config_edit_title',
    'title arguments' => array(
      5,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'key_ui_key_config_form',
      5,
    ),
    'access arguments' => array(
      'administer keys',
    ),
    'file' => 'includes/key_ui.admin.inc',
  );
  $items[KEY_MENU_PATH . '/delete/%key_ui_config'] = array(
    'title' => 'Delete key',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'key_ui_key_config_delete_confirm',
      5,
    ),
    'access arguments' => array(
      'administer keys',
    ),
    'file' => 'includes/key_ui.admin.inc',
  );
  $items[KEY_MENU_PATH . '/integration'] = array(
    'title' => 'Integration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'key_ui_key_integration_form',
    ),
    'access arguments' => array(
      'administer keys',
    ),
    'file' => 'includes/key_ui.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}