You are here

function spaces_menu in Spaces 6.2

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

Implementation of hook_menu().

4 string references to 'spaces_menu'
spaces_og.module in spaces_og/spaces_og.module
spaces_site.module in spaces_site/spaces_site.module
spaces_taxonomy.module in spaces_taxonomy/spaces_taxonomy.module
spaces_user.module in spaces_user/spaces_user.module

File

./spaces.module, line 80

Code

function spaces_menu() {
  $items = array();
  $items['admin/build/spaces'] = array(
    'title' => 'Spaces presets',
    'description' => 'Create and configure spaces for your site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_preset_default_form',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/build/spaces/presets'] = array(
    'title' => 'Presets',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_preset_default_form',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  );
  $items['admin/build/spaces/presets/add'] = array(
    'title' => 'Add',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_preset_form',
      'add',
    ),
  );
  $items['admin/build/spaces/presets/edit'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_preset_form',
      'edit',
    ),
  );
  $items['admin/build/spaces/presets/export'] = array(
    'title' => 'Export preset',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_preset_export',
    ),
  );
  $items['admin/build/spaces/presets/delete'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'spaces_preset_delete_form',
      5,
      6,
    ),
  );
  $items['admin/build/spaces/presets/disable'] = array(
    'page callback' => '_spaces_preset_disable_page',
  );
  $items['admin/build/spaces/presets/enable'] = array(
    'page callback' => '_spaces_preset_enable_page',
  );
  foreach ($items as $path => $item) {
    $items[$path]['access callback'] = 'user_access';
    $items[$path]['access arguments'] = array(
      'administer spaces',
    );
    $items[$path]['file'] = 'spaces_admin.inc';
    if (!isset($item['type'])) {
      $items[$path]['type'] = MENU_CALLBACK;
    }
  }
  $items['spaces-access-denied'] = array(
    'title' => 'Access denied',
    'description' => 'Page callback for early-stack spaces router access denied.',
    'page callback' => 'spaces_access_denied',
    'page arguments' => array(),
    'access callback' => FALSE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}