You are here

function regcode_menu in Registration codes 7

Same name and namespace in other branches
  1. 5.3 regcode.module \regcode_menu()
  2. 5 regcode.module \regcode_menu()
  3. 6.2 regcode.module \regcode_menu()
  4. 6 regcode.module \regcode_menu()
  5. 7.2 regcode.module \regcode_menu()

Implements hook_menu().

File

./regcode.module, line 65
Main functionality and hooks of regcode module.

Code

function regcode_menu() {
  $items = array();
  $items['admin/config/people/regcode'] = array(
    'title' => 'Registration codes',
    'description' => 'Manage registration codes.',
    'file' => 'regcode.admin.php',
    'page callback' => 'regcode_admin_list',
    'access arguments' => array(
      'administer registration codes',
    ),
  );
  $items['admin/config/people/regcode/list'] = array(
    'title' => 'List',
    'description' => 'List of registration codes',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/config/people/regcode/create'] = array(
    'title' => 'Create',
    'description' => 'Create a registration code',
    'type' => MENU_LOCAL_TASK | MENU_LOCAL_ACTION,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'regcode_admin_create',
    ),
    'access arguments' => array(
      'administer registration codes',
    ),
    'file' => 'regcode.admin.php',
    'weight' => 20,
  );
  $items['admin/config/people/regcode/manage'] = array(
    'title' => 'Manage',
    'description' => 'Manage the registration code database',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'regcode_admin_manage',
    ),
    'access arguments' => array(
      'administer registration codes',
    ),
    'file' => 'regcode.admin.php',
    'weight' => 30,
  );
  $items['admin/config/people/regcode/settings'] = array(
    'title' => 'Settings',
    'description' => 'Settings for registration code functionality.',
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer registration codes',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'regcode_admin_settings',
    ),
    'file' => 'regcode.admin.php',
    'weight' => 40,
  );
  return $items;
}