You are here

function spaces_core_menu in Spaces 5

Same name and namespace in other branches
  1. 5.2 spaces_core/spaces_core.module \spaces_core_menu()
  2. 6 spaces_core/spaces_core.module \spaces_core_menu()

Implementation of hook_menu()

File

spaces_core/spaces_core.module, line 6

Code

function spaces_core_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    if (module_exists('book')) {
      $items[] = array(
        'title' => t('Documents'),
        'path' => 'documents',
        'description' => t('Displays the parent book node for a given spaces group.'),
        'callback' => 'spaces_core_documents',
        'access' => user_access('access content'),
        'type' => MENU_NORMAL_ITEM,
      );
    }
    if (module_exists('taxonomy')) {
      $items[] = array(
        'title' => t('Taxonomy'),
        'path' => 'taxonomy/term',
        'description' => t('Custom taxonomy term callback.'),
        'callback' => 'spaces_core_taxonomy',
        'access' => user_access('access content'),
        'type' => MENU_CALLBACK,
      );
    }
    return $items;
  }
}