You are here

function context_prefix_menu in Context 5

Implementation of hook_menu().

File

context_prefix/context_prefix.module, line 11

Code

function context_prefix_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'type' => module_exists('context_ui') ? MENU_LOCAL_TASK : MENU_NORMAL_ITEM,
      'title' => t('Context prefix'),
      'description' => t('Settings for context prefix.'),
      'path' => 'admin/build/context/prefix',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'context_prefix_settings_form',
      ),
      'access' => user_access('administer site configuration'),
      'weight' => 10,
    );
    $items[] = array(
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'title' => t('Settings'),
      'path' => 'admin/build/context/prefix/settings',
      'callback arguments' => array(
        'context_prefix_settings_form',
      ),
      'access' => user_access('administer site configuration'),
      'weight' => 0,
    );
    $items[] = array(
      'type' => MENU_LOCAL_TASK,
      'title' => t('Registered prefixes'),
      'path' => 'admin/build/context/prefix/list',
      'callback' => 'context_prefix_admin',
      'access' => user_access('administer site configuration'),
      'weight' => 10,
    );
  }
  return $items;
}