function contact_menu

Implements hook_menu().

File

drupal/core/modules/contact/contact.module, line 59
Enables the use of personal and site-wide contact forms.

Code

function contact_menu() {
  $items['admin/structure/contact'] = array(
    'title' => 'Contact form',
    'description' => 'Create a system contact form and set up categories for the form to use.',
    'page callback' => 'contact_category_list',
    'access arguments' => array(
      'administer contact forms',
    ),
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/add'] = array(
    'title' => 'Add category',
    'page callback' => 'contact_category_add',
    'access arguments' => array(
      'administer contact forms',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => 1,
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/manage/%contact_category'] = array(
    'title' => 'Edit contact category',
    'page callback' => 'contact_category_edit',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer contact forms',
    ),
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/manage/%contact_category/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/contact/manage/%contact_category/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'contact_category_delete_form',
      4,
    ),
    'access arguments' => array(
      'administer contact forms',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'contact.admin.inc',
  );
  $items['contact'] = array(
    'title' => 'Contact',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'contact_site_form',
    ),
    'access arguments' => array(
      'access site-wide contact form',
    ),
    'menu_name' => 'footer',
    'type' => MENU_SUGGESTED_ITEM,
    'file' => 'contact.pages.inc',
  );
  $items['user/%user/contact'] = array(
    'title' => 'Contact',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'contact_personal_form',
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'access callback' => '_contact_personal_tab_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 2,
    'file' => 'contact.pages.inc',
  );
  return $items;
}