You are here

function mailing_list_menu in Mailing List 7

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

Implement hook_menu().

File

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

Code

function mailing_list_menu() {
  $items = array();
  $items['admin/structure/mailing-list'] = array(
    'title' => 'Mailing lists',
    'description' => 'Manage your mailing lists.',
    'page callback' => 'mailing_list_lists',
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/structure/mailing-list/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/mailing-list/add'] = array(
    'title' => '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/structure/mailing-list/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_admin_settings',
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/structure/mailing-list/%mailing_list'] = array(
    'title' => 'List e-mails',
    'page callback' => 'mailing_list_emails_list',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
  );
  $items['admin/structure/mailing-list/%mailing_list/list'] = array(
    'title' => 'List e-mails',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/mailing-list/%mailing_list/add'] = array(
    'title' => 'Add e-mail',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_subscription_form',
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
  );
  $items['admin/structure/mailing-list/%mailing_list/import'] = array(
    'title' => '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/structure/mailing-list/%mailing_list/export'] = array(
    'title' => '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/structure/mailing-list/%mailing_list/edit'] = array(
    'title' => '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/structure/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/structure/mailing-list/%mailing_list/%mailing_list_email'] = array(
    'title' => 'Edit e-mail',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_subscription_form',
      3,
      TRUE,
      4,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
  );
  $items['admin/structure/mailing-list/%mailing_list/emails/delete'] = array(
    'title' => 'Delete e-mail',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailing_list_email_delete_confirm',
      3,
    ),
    'access arguments' => array(
      'administer mailing lists',
    ),
    'file' => 'mailing_list.admin.inc',
  );
  return $items;
}