You are here

function print_menu in Printer, email and PDF versions 6

Same name and namespace in other branches
  1. 5.4 print.module \print_menu()
  2. 5 print.module \print_menu()
  3. 5.2 print.module \print_menu()
  4. 5.3 print.module \print_menu()
  5. 7.2 print.module \print_menu()
  6. 7 print.module \print_menu()
  7. 5.x print.module \print_menu()

Implementation of hook_menu().

File

./print.module, line 196
Displays Printer-friendly versions of Drupal pages.

Code

function print_menu() {
  $items = array();
  $items[PRINT_PATH] = array(
    'title' => 'Printer-friendly',
    'page callback' => 'print_controller_html',
    'access arguments' => array(
      'access print',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'print.pages.inc',
  );
  $items[PRINT_PATH . '/' . PRINT_PATH] = array(
    'access callback' => FALSE,
  );
  $items['admin/settings/print'] = array(
    'title' => 'Printer, email and PDF versions',
    'description' => 'Adds a printer-friendly version link to content and administrative pages.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_html_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'file' => 'print.admin.inc',
  );
  $items['admin/settings/print/html'] = array(
    'title' => 'Web page',
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/print/html/options'] = array(
    'title' => 'Options',
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/print/html/strings'] = array(
    'title' => 'Text strings',
    'description' => 'Override the user-facing strings used in the printer-friendly version.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_html_strings_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print.admin.inc',
  );
  $items['admin/settings/print/common'] = array(
    'title' => 'Settings',
    'description' => 'Settings for the common functionalities for all the print sub-modules.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_main_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print.admin.inc',
  );
  $items['admin/settings/print/common/options'] = array(
    'title' => 'Options',
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/print/common/strings'] = array(
    'title' => 'Text strings',
    'description' => 'Override the user-facing strings used by the print module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_main_strings_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print.admin.inc',
  );
  return $items;
}