You are here

function regcode_voucher_menu in Registration codes 7

Same name and namespace in other branches
  1. 6.2 regcode_voucher/regcode_voucher.module \regcode_voucher_menu()
  2. 6 regcode_voucher/regcode_voucher.module \regcode_voucher_menu()
  3. 7.2 regcode_voucher/regcode_voucher.module \regcode_voucher_menu()

Implements hook_menu().

File

regcode_voucher/regcode_voucher.module, line 11
Main code and hooks for regcode voucher module.

Code

function regcode_voucher_menu() {
  $items = array();
  $items['admin/config/people/regcode/voucher'] = array(
    'title' => 'Voucher',
    'description' => 'Settings for using registration codes after registration',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'regcode_voucher_admin_form',
    ),
    'access arguments' => array(
      'administer registration codes',
    ),
    'weight' => 20,
  );
  $items['user/%user/regcode'] = array(
    'title' => 'Voucher',
    'description' => 'Enter a voucher code',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'regcode_voucher_profiletab_form',
    ),
    'access callback' => '_regcode_voucher_accesscheck',
    'access arguments' => array(
      1,
      'tab',
    ),
    'weight' => 20,
  );
  return $items;
}