You are here

function contact_menu in Drupal 7

Same name and namespace in other branches
  1. 4 modules/contact.module \contact_menu()
  2. 5 modules/contact/contact.module \contact_menu()
  3. 6 modules/contact/contact.module \contact_menu()

Implements hook_menu().

File

modules/contact/contact.module, line 57
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' => 'drupal_get_form',
    'page arguments' => array(
      'contact_category_edit_form',
    ),
    'access arguments' => array(
      'administer contact forms',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => 1,
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/edit/%contact'] = array(
    'title' => 'Edit contact category',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'contact_category_edit_form',
      4,
    ),
    'access arguments' => array(
      'administer contact forms',
    ),
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/delete/%contact'] = array(
    'title' => 'Delete contact',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'contact_category_delete_form',
      4,
    ),
    'access arguments' => array(
      'administer contact forms',
    ),
    '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',
    ),
    '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;
}