function views_ui_menu
Same name in other branches
- 7.x-3.x views_ui.module \views_ui_menu()
File
-
./
views_ui.module, line 10
Code
function views_ui_menu() {
$items = array();
// Minor code reduction technique
$base = array(
'access callback' => 'user_access',
'access arguments' => array(
'administer views',
),
'file' => 'includes/admin.inc',
);
$callback = $base + array(
'type' => MENU_CALLBACK,
);
$convert = array(
'file' => 'includes/convert.inc',
) + $base;
$items['admin/build/views'] = $base + array(
'title' => 'Views',
'page callback' => 'views_ui_list_views',
'description' => 'Views are customized lists of content on your system; they are highly configurable and give you control over how lists of content are presented.',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/build/views/list'] = $base + array(
'title' => 'List',
'page callback' => 'views_ui_list_views',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => '-1',
);
$items['admin/build/views/add'] = $base + array(
'title' => 'Add',
'page callback' => 'views_ui_add_page',
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/views/import'] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_import_page',
),
'access callback' => 'views_import_access',
'type' => MENU_LOCAL_TASK,
) + $base;
$items['admin/build/views/tools'] = $base + array(
'title' => 'Tools',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_admin_tools',
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/views/tools/basic'] = $base + array(
'title' => 'Basic',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_admin_tools',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/build/views/tools/convert'] = $convert + array(
'title' => 'Convert',
'description' => 'Convert stored Views 1 views.',
'page callback' => 'views_ui_admin_convert',
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items['admin/build/views1/delete'] = $convert + array(
'title' => 'Delete view',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_delete1_confirm',
4,
),
'type' => MENU_CALLBACK,
);
$items['admin/build/views1/convert'] = $convert + array(
'title' => 'Convert view',
'page callback' => 'views_ui_convert1',
'page arguments' => array(
4,
),
'type' => MENU_CALLBACK,
);
$items['admin/build/views/delete/%views_ui_cache'] = $callback + array(
'title' => 'Delete view',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_delete_confirm',
4,
),
);
$items['admin/build/views/break-lock/%views_ui_cache'] = $callback + array(
'title' => 'Delete view',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_break_lock_confirm',
4,
),
);
$items['admin/build/views/export/%views_ui_cache'] = $callback + array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
'views_ui_export_page',
4,
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/views/clone/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_clone_page',
'page arguments' => array(
4,
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/views/enable/%views_ui_default'] = $callback + array(
'page callback' => 'views_ui_enable_page',
'page arguments' => array(
4,
),
);
$items['admin/build/views/disable/%views_ui_default'] = $callback + array(
'page callback' => 'views_ui_disable_page',
'page arguments' => array(
4,
),
);
// Many line items for editing a view.
$items['admin/build/views/edit/%views_ui_cache'] = $base + array(
'title' => 'Edit',
'page callback' => 'views_ui_edit_page',
'page arguments' => array(
4,
),
'type' => MENU_LOCAL_TASK,
);
// lots of little edit form pieces.
$items['admin/build/views/%views_ui_js/analyze/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_analyze_view',
'page arguments' => array(
3,
5,
),
);
$items['admin/build/views/%views_ui_js/reorder-displays/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_reorder_view',
'page arguments' => array(
3,
5,
),
);
$items['admin/build/views/%views_ui_js/human_name/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_edit_details',
'page arguments' => array(
'human_name',
3,
5,
),
);
$items['admin/build/views/%views_ui_js/tag/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_edit_details',
'page arguments' => array(
'tag',
3,
5,
),
);
$items['admin/build/views/%views_ui_js/description/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_edit_details',
'page arguments' => array(
'description',
3,
5,
),
);
$items['admin/build/views/%views_ui_js/add-display/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_add_display',
'page arguments' => array(
3,
5,
),
);
$items['admin/build/views/%views_ui_js/clone-display/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_clone_display',
'page arguments' => array(
3,
5,
6,
),
);
// Live preview
$items['admin/build/views/%views_ui_js/preview/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_preview',
'page arguments' => array(
3,
5,
),
);
// autocompletes for handlers and such
$items['admin/views/ajax/autocomplete/tag'] = $callback + array(
'page callback' => 'views_ui_autocomplete_tag',
);
// Generic ajax callback
// display specific parameters
$items['admin/build/views/%views_ui_js/%/%views_ui_cache'] = $callback + array(
'page callback' => 'views_ui_ajax_form',
'page arguments' => array(
3,
4,
5,
),
);
return $items;
}