You are here

function mass_contact_menu in Mass Contact 6

Same name and namespace in other branches
  1. 5.2 mass_contact.module \mass_contact_menu()
  2. 5 mass_contact.module \mass_contact_menu()
  3. 7 mass_contact.module \mass_contact_menu()

Implementation of hook_menu().

File

./mass_contact.module, line 72
This is the main code file for the Mass Contact module. This module enables users to contact multiple users through selected roles.

Code

function mass_contact_menu() {
  $items = array();
  $items['admin/build/mass_contact'] = array(
    'title' => 'Mass Contact form',
    'page callback' => 'mass_contact_admin_categories',
    'access arguments' => array(
      'administer mass contact',
    ),
    'description' => 'Create a mass contact form and set up categories for the form to use.',
  );
  $items['admin/build/mass_contact/list'] = array(
    'title' => 'Category list',
    'page callback' => 'mass_contact_admin_categories',
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/build/mass_contact/add'] = array(
    'title' => 'Add category',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_edit',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/build/mass_contact/edit'] = array(
    'title' => 'Edit Mass Contact category',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_edit',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/mass_contact/delete'] = array(
    'title' => 'Delete Mass Contact category',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_delete',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/mass_contact/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_settings_misc',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  $items['admin/build/mass_contact/settings/misc'] = array(
    'title' => 'Miscellaneous',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_settings_misc',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/build/mass_contact/settings/header'] = array(
    'title' => 'Message header',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_settings_header',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/build/mass_contact/settings/body'] = array(
    'title' => 'Message body',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mass_contact_admin_settings_body',
    ),
    'access arguments' => array(
      'administer mass contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  $items['mass_contact'] = array(
    'title' => 'Mass Contact',
    'page callback' => 'mass_contact_site_page',
    'access arguments' => array(
      'send mass contact e-mails',
    ),
  );
  return $items;
}