You are here

function hosting_signup_menu in Hosting 5

Same name and namespace in other branches
  1. 6.2 signup/hosting_signup.module \hosting_signup_menu()
  2. 7.4 signup/hosting_signup.module \hosting_signup_menu()
  3. 7.3 signup/hosting_signup.module \hosting_signup_menu()

Implementation of hook_menu

File

signup/hosting_signup.module, line 33
Provides a signup form that can be run on remote sites

Code

function hosting_signup_menu($may_cache) {
  if (!$may_cache) {
    global $user;
    $items[] = array(
      'path' => 'hosting/signup',
      'title' => t('Sign up for a site'),
      'description' => t('Create your own hosted site'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'hosting_signup_form',
      ),
      'access' => $user->uid == 0 && user_access('access hosting signup form'),
    );
  }
  else {
    $items[] = array(
      'path' => 'admin/hosting/signup',
      'title' => t('Signup form'),
      'description' => t('Configure the behaviour of the simplified hosting signup form'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'hosting_signup_settings',
      ),
      'access' => user_access('administer hosting signup form'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'hosting/signup/get_form',
      'title' => t('Sign up for a site'),
      'description' => t('Create your own hosted site'),
      'callback' => 'hosting_signup_get_form',
      'type' => MENU_CALLBACK,
      'access' => TRUE,
    );
    $items[] = array(
      'path' => 'hosting/signup/form_populate',
      'callback' => '_hosting_signup_form_populate',
      'type' => MENU_CALLBACK,
      'access' => TRUE,
    );
    $items[] = array(
      'path' => 'hosting/signup/thanks',
      'callback' => 'hosting_signup_thanks',
      'type' => MENU_CALLBACK,
      'access' => TRUE,
    );
  }
  return $items;
}