You are here

function context_ui_menu in Context 6

Same name and namespace in other branches
  1. 5 context_ui/context_ui.module \context_ui_menu()
  2. 6.3 context_ui/context_ui.module \context_ui_menu()
  3. 6.2 context_ui/context_ui.module \context_ui_menu()
  4. 7.3 context_ui/context_ui.module \context_ui_menu()

Implementation of hook_menu().

File

context_ui/context_ui.module, line 70

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_admin',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/build/context/list'] = array(
    'title' => 'List',
    'page callback' => 'context_ui_admin',
    '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' => t('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' => t('Core attributes'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/build/context/%context_ui_menu/clone'] = array(
    'title' => t('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' => t('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' => t('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' => t('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' => t('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;
}