You are here

function mailing_list_menu in Mailing List 6

Same name and namespace in other branches
  1. 7 mailing_list.module \mailing_list_menu()

Implementation of hook_menu().

File

./mailing_list.module, line 27
Minimalistic mailing list module.

Code

function mailing_list_menu() {
  $items = array();
  $items['admin/build/mailing-list'] = array(
    'title' => t('Mailing lists'),
    'description' => t('Manage your mailing lists.'),
    'page callback' => 'mailing_list_lists',
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/build/mailing-list/add'] = array(
    'title' => t('Add'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_form',
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list'] = array(
    'title' => 'List e-mails',
    'type' => MENU_CALLBACK,
    'page callback' => 'mailing_list_emails',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/list'] = array(
    'title' => 'List e-mails',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/build/mailing-list/%mailing_list/add'] = array(
    'title' => t('Add e-mail'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_email_form',
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/import'] = array(
    'title' => t('Import e-mails'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_import_form',
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -2,
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/export'] = array(
    'title' => t('Export list'),
    'page callback' => 'mailing_list_export',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/edit'] = array(
    'title' => t('Rename list'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_form',
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/delete'] = array(
    'title' => 'Delete list',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_delete_confirm',
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/%mailing_list_email'] = array(
    'title' => 'Edit e-mail',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_email_form',
      3,
      4,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/build/mailing-list/%mailing_list/%mailing_list_email/delete'] = array(
    'title' => 'Delete e-mail',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_email_delete_confirm',
      3,
      4,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'mailing_list.admin.inc',
  );
  return $items;
}