You are here

function regcode_menu in Registration codes 5.3

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

Define menu items and page callbacks.

Parameters

$may_cache: A boolean indicating whether cacheable menu items should be returned.

Return value

An array of menu items. Each menu item is an associative array.

File

./regcode.module, line 77
The main module file of the registration code module

Code

function regcode_menu($may_cache) {
  $items = array();
  $items[] = array(
    'path' => 'admin/regcode',
    'title' => t('Registration code'),
    'callback' => 'regcode_admin_page',
    'callback arguments' => array(
      'regcode_admin_settings',
    ),
    'access' => user_access('administer registration codes'),
    'description' => t('Settings for registration code functionality.'),
  );
  $items[] = array(
    'path' => 'admin/regcode/settings',
    'title' => t('Settings'),
    'description' => t('Settings for registration code functionality.'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 10,
  );
  $items[] = array(
    'path' => 'admin/regcode/list',
    'title' => t('List'),
    'description' => t('List of registration codes'),
    'callback' => 'regcode_admin_page',
    'callback arguments' => array(
      'regcode_admin_list',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 20,
  );
  $items[] = array(
    'path' => 'admin/regcode/import',
    'title' => t('Import'),
    'description' => t('Import registration codes'),
    'callback' => 'regcode_admin_page',
    'callback arguments' => array(
      'regcode_admin_import',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 30,
  );
  return $items;
}