You are here

function name_menu in Name Field 6

Same name and namespace in other branches
  1. 7 name.module \name_menu()

Implementation of hook_menu().

File

./name.module, line 105
Defines an API for displaying and inputing names.

Code

function name_menu() {
  $items = array();

  // Admin menu items
  $items['admin/settings/name'] = array(
    'title' => 'Name',
    'page callback' => 'name_list_custom_formats',
    'description' => 'List custom name formats.',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'name.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/settings/name/list'] = array(
    'title' => 'Custom formats',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/settings/name/add'] = array(
    'title' => 'Add custom format',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'name_custom_formats_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'name.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/name/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'name_admin_settings_form',
    ),
    'description' => 'Administer the Names module and custom name formats.',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'name.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/settings/name/%'] = array(
    'title' => 'Edit custom format',
    'page callback' => 'name_custom_format_edit',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'name.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/name/%/delete'] = array(
    'title' => 'Delete custom name format',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'name_custom_format_delete_form',
      3,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'name.admin.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}