function contact_menu

Implements hook_menu().

File

modules/contact/contact.module, line 57

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.