1 contact.module contact_menu()

Implements hook_menu().

File

core/modules/contact/contact.module, line 69
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' => 'backdrop_get_form',
    'page arguments' => array('contact_category_list'),
    'access arguments' => array('administer contact forms'),
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/add'] = array(
    'title' => 'Add category',
    'page callback' => 'backdrop_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/list'] = array(
    'title' => 'Categories',
    'page callback' => 'contact_category_list',
    'access arguments' => array('administer contact forms'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 1,
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('contact_settings_form'),
    'access arguments' => array('administer contact forms'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
    'file' => 'contact.admin.inc',
  );
  $items['admin/structure/contact/configure/%contact'] = array(
    'title' => 'Configure contact category',
    'page callback' => 'backdrop_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' => 'backdrop_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' => 'backdrop_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' => 'backdrop_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;
}