You are here

function hosting_site_menu in Hosting 7.4

Same name and namespace in other branches
  1. 5 site/hosting_site.module \hosting_site_menu()
  2. 6.2 site/hosting_site.module \hosting_site_menu()
  3. 7.3 site/hosting_site.module \hosting_site_menu()

Implements hook_menu().

File

site/hosting_site.module, line 44
Contains hook implementations for Hosting site module.

Code

function hosting_site_menu() {
  $items = array();
  $items['hosting/sites/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['hosting/sites/add'] = array(
    'title' => 'Add site',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_goto',
    'page arguments' => array(
      'node/add/site',
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'create',
      'site',
    ),
  );
  $items['node/%node/platform-add-site'] = array(
    'title' => 'Add site',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'hosting_site_add_by_platform',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'hosting_site_add_by_platform_access',
    'access arguments' => array(
      1,
    ),
  );
  $items['hosting/hosting_site_form_check'] = array(
    'page callback' => '_hosting_site_form_check',
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'access content',
    ),
  );

  // Provide autocomplete functionality.
  $items['hosting/sites/autocomplete'] = array(
    'title' => 'Autocomplete for sites',
    'page callback' => 'hosting_site_autocomplete_sites',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['node/%node/goto_site'] = array(
    'page callback' => 'hosting_site_goto',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'view',
      1,
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}