function contact_menu in Contact 6.2
Same name and namespace in other branches
- 7.2 contact.module \contact_menu()
Implements hook_menu().
File
- ./
contact.module, line 51 - Enables the use of personal and site-wide contact forms.
Code
function contact_menu() {
$items['admin/build/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/build/contact/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/build/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_TASK,
'weight' => 1,
'file' => 'contact.admin.inc',
);
$items['admin/build/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',
),
'type' => MENU_CALLBACK,
'file' => 'contact.admin.inc',
);
$items['admin/build/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',
),
'type' => MENU_CALLBACK,
'file' => 'contact.admin.inc',
);
$items['contact'] = array(
'title' => 'Contact',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'contact_mail_page',
),
'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_mail_user',
1,
),
'type' => MENU_LOCAL_TASK,
'access callback' => '_contact_personal_tab_access',
'access arguments' => array(
1,
),
'weight' => 2,
'file' => 'contact.pages.inc',
);
return $items;
}