You are here

function signup_menu in Signup 6

Same name and namespace in other branches
  1. 5.2 signup.module \signup_menu()
  2. 5 signup.module \signup_menu()
  3. 6.2 signup.module \signup_menu()
  4. 7 signup.module \signup_menu()

Implementation of hook_menu().

Related topics

File

./signup.module, line 285
The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…

Code

function signup_menu() {
  $path = drupal_get_path('module', 'signup') . '/includes';
  $items = array();
  $items['admin/settings/signup'] = array(
    'description' => 'Configure settings for signups.',
    'access arguments' => array(
      'administer all signups',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'signup_settings_form',
    ),
    'title' => user_access('access administration pages') ? 'Signup' : 'Signup settings',
    'file' => 'admin.settings.inc',
    'file path' => $path,
  );
  $items['signup/cancel/%signup_menu/%'] = array(
    'description' => 'View all signup-enabled posts, and open or close signups on them.',
    'type' => MENU_CALLBACK,
    'access callback' => '_signup_menu_signup_access',
    'access arguments' => array(
      2,
      'cancel',
    ),
    'page callback' => 'signup_cancel_signup_page',
    'page arguments' => array(
      2,
      3,
    ),
    'file' => 'signup_cancel.inc',
    'file path' => $path,
  );
  $items['signup/edit/%signup_menu'] = array(
    'title' => 'Edit signup',
    'page callback' => 'signup_edit_page',
    'page arguments' => array(
      2,
    ),
    'access callback' => '_signup_menu_signup_access',
    'access arguments' => array(
      2,
      'edit',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'signup_edit_form.inc',
    'file path' => $path,
  );
  $items['admin/content/signup'] = array(
    'description' => 'View all signup-enabled posts, and open or close signups on them.',
    'access arguments' => array(
      'administer all signups',
    ),
    'page callback' => 'signup_admin_page',
    'title' => 'Signup administration',
    'file' => 'admin.signup_administration.inc',
    'file path' => $path,
  );

  // Conditionally add any available signup-related tabs to nodes.
  $items['node/%node/signups'] = array(
    'title' => 'Signups',
    'page callback' => 'signup_node_tab_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'any',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 20,
  );
  $items['node/%node/signups/signup'] = array(
    'title' => 'Sign up',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'signup',
    ),
    'weight' => -10,
  );
  $items['node/%node/signups/list'] = array(
    'title' => 'List',
    'page callback' => 'signup_user_list_output',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'list-tab',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'node_output.inc',
    'file path' => $path,
  );
  $items['node/%node/signups/admin'] = array(
    'title' => 'Administer',
    'page callback' => 'signup_node_admin_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'admin',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'file' => 'node_admin.inc',
    'file path' => $path,
  );
  $items['node/%node/signups/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'signup_node_settings_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'admin',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'node_settings.inc',
    'file path' => $path,
  );
  $items['node/%node/signups/confirm'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'signup_cancel_multiple_confirm',
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'admin',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'node_admin.inc',
    'file path' => $path,
  );
  $items['node/%node/signups/add'] = array(
    'title' => 'Add',
    'page callback' => 'signup_node_admin_add_user_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'add',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
    'file' => 'signup_form.inc',
    'file path' => $path,
  );
  $items['node/%node/signups/broadcast'] = array(
    'title' => 'Signup broadcast',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'signup_broadcast_form',
      1,
    ),
    'access callback' => '_signup_menu_access',
    'access arguments' => array(
      1,
      'broadcast',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
    'file' => 'broadcast.inc',
    'file path' => $path,
  );
  return $items;
}