You are here

function spaces_menu in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces.module \spaces_menu()
  2. 6.3 spaces.module \spaces_menu()
  3. 6 spaces.module \spaces_menu()
  4. 6.2 spaces.module \spaces_menu()
  5. 7.3 spaces.module \spaces_menu()
  6. 7 spaces.module \spaces_menu()

Implementation of hook_menu().

2 string references to 'spaces_menu'
spaces_og.module in ./spaces_og.module
spaces_user.module in ./spaces_user.module

File

./spaces.module, line 63

Code

function spaces_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/build/spaces',
      'title' => t('Spaces presets'),
      'description' => t('Create and configure spaces for your site.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'spaces_preset_default_form',
      ),
      'access' => user_access('administer spaces'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/build/spaces/presets',
      'title' => t('Presets'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'spaces_preset_default_form',
      ),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -1,
    );
    $items[] = array(
      'path' => 'admin/build/spaces/presets/add',
      'title' => t('Add'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'spaces_preset_form',
        'add',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/spaces/presets/edit',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'spaces_preset_form',
        'edit',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/spaces/presets/delete',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'spaces_preset_delete_form',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/spaces/presets/disable',
      'callback' => '_spaces_preset_disable_page',
      'type' => PAGE_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/spaces/presets/enable',
      'callback' => '_spaces_preset_enable_page',
      'type' => PAGE_CALLBACK,
    );
  }
  else {
    spaces_router('menu');
  }
  return $items;
}