function context_ui_menu in Context 6.2
Same name and namespace in other branches
- 5 context_ui/context_ui.module \context_ui_menu()
- 6.3 context_ui/context_ui.module \context_ui_menu()
- 6 context_ui/context_ui.module \context_ui_menu()
- 7.3 context_ui/context_ui.module \context_ui_menu()
Implementation of hook_menu().
File
- context_ui/
context_ui.module, line 68
Code
function context_ui_menu() {
$items['admin/build/context'] = array(
'title' => 'Context',
'description' => 'Associate menus, views, blocks, etc. with different contexts to structure your site.',
'page callback' => 'context_ui_list_contexts',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/build/context/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['admin/build/context/add'] = array(
'title' => 'Add',
'description' => 'Add a context to your site.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_form',
'add',
),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items['admin/build/context/import'] = array(
'title' => 'Import',
'description' => 'Import a context definition into your site.',
'page callback' => 'context_ui_import_page',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['admin/build/context/export'] = array(
'title' => 'Export',
'description' => 'Export multiple contexts from your site.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_bulk_export',
3,
),
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['admin/build/context/%context_ui_menu'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_form',
'edit',
3,
),
'type' => MENU_CALLBACK,
);
$items['admin/build/context/%context_ui_menu/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_form',
'edit',
3,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
$items['admin/build/context/%context_ui_menu/edit/items'] = array(
'title' => 'Core attributes',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/build/context/%context_ui_menu/clone'] = array(
'title' => 'Clone',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_form',
'clone',
3,
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/context/%context_ui_menu/export'] = array(
'title' => 'Export',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_export',
3,
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/context/%context_ui_menu/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_confirm',
'delete',
3,
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/context/%context_ui_menu/disable'] = array(
'title' => 'Disable',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_confirm',
'disable',
3,
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/context/%context_ui_menu/enable'] = array(
'title' => 'Enable',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'context_ui_confirm',
'enable',
3,
),
'type' => MENU_LOCAL_TASK,
);
foreach ($items as $path => $item) {
$items[$path]['access callback'] = 'user_access';
$items[$path]['access arguments'] = array(
'administer site configuration',
);
$items[$path]['file'] = 'context_ui.admin.inc';
}
return $items;
}