You are here

function mailhandler_menu in Mailhandler 6

Same name and namespace in other branches
  1. 5 mailhandler.module \mailhandler_menu()
  2. 6.2 mailhandler.module \mailhandler_menu()
  3. 7 mailhandler.module \mailhandler_menu()

Implementation of hook_menu().

Related topics

File

./mailhandler.module, line 53
Mailhandler module code.

Code

function mailhandler_menu() {
  $items = array();
  $items['admin/content/mailhandler'] = array(
    'title' => 'Mailhandler Mailboxes',
    'description' => 'Manage mailboxes and retrieve messages.',
    'page callback' => 'mailhandler_list_mailboxes',
    'access arguments' => array(
      'administer mailhandler',
    ),
    'file' => 'mailhandler.admin.inc',
  );
  $items['admin/content/mailhandler/list'] = array(
    'title' => 'List',
    'description' => 'Manage mailboxes and retrieve messages.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access arguments' => array(
      'administer mailhandler',
    ),
    'weight' => -10,
  );
  $items['admin/content/mailhandler/add'] = array(
    'title' => 'Add mailbox',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailhandler_add_edit_mailbox',
      NULL,
    ),
    'access arguments' => array(
      'administer mailhandler',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'mailhandler.admin.inc',
  );
  $items['admin/content/mailhandler/clone/%mailhandler_mailbox'] = array(
    'title' => 'Add mailbox',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailhandler_add_edit_mailbox',
      4,
      TRUE,
    ),
    'access arguments' => array(
      'administer mailhandler',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'mailhandler.admin.inc',
  );
  $items['admin/content/mailhandler/retrieve/%mailhandler_mailbox'] = array(
    'title' => 'Retrieve',
    'page callback' => 'mailhandler_node_process_mailbox',
    'page arguments' => array(
      4,
      'ui',
    ),
    'access arguments' => array(
      'administer mailhandler',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'mailhandler.retrieve.inc',
  );
  $items['admin/content/mailhandler/edit/%mailhandler_mailbox'] = array(
    'title' => 'Edit mailbox',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailhandler_add_edit_mailbox',
      4,
    ),
    'access arguments' => array(
      'administer mailhandler',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'mailhandler.admin.inc',
  );
  $items['admin/content/mailhandler/delete/%mailhandler_mailbox'] = array(
    'title' => 'Delete mailbox',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailhandler_admin_delete_confirm',
      4,
    ),
    'access arguments' => array(
      'administer mailhandler',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'mailhandler.admin.inc',
  );
  $items['admin/settings/mailhandler'] = array(
    'title' => 'Mailhandler Settings',
    'description' => t('Set the default content type for incoming messages and set the cron limit.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailhandler_admin_settings',
    ),
    'access arguments' => array(
      'administer mailhandler',
    ),
    'file' => 'mailhandler.admin.inc',
  );
  return $items;
}