You are here

function print_mail_menu in Printer, email and PDF versions 5.x

Same name and namespace in other branches
  1. 5.4 print_mail/print_mail.module \print_mail_menu()
  2. 5.3 print_mail/print_mail.module \print_mail_menu()
  3. 6 print_mail/print_mail.module \print_mail_menu()
  4. 7.2 print_mail/print_mail.module \print_mail_menu()
  5. 7 print_mail/print_mail.module \print_mail_menu()

Implementation of hook_menu().

File

print_mail/print_mail.module, line 55
Displays Printer-friendly versions of Drupal pages.

Code

function print_mail_menu() {
  $items = array();
  $items[PRINTMAIL_PATH] = array(
    'title' => variable_get('print_mail_text_title', 'Send page by e-mail'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_mail_form',
    ),
    'access callback' => '_print_mail_access',
    'access arguments' => array(
      'access send to friend',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'print_mail.inc',
  );
  $items[PRINTMAIL_PATH . '/' . PRINTMAIL_PATH] = array(
    'access callback' => FALSE,
  );
  $items['admin/settings/print/email'] = array(
    'title' => 'e-mail',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_mail_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print_mail.admin.inc',
  );
  $items['admin/settings/print/email/options'] = array(
    'title' => 'Options',
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/print/email/strings'] = array(
    'title' => 'Text strings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_mail_strings_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print_mail.admin.inc',
  );
  return $items;
}