You are here

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

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

Implementation of hook_menu().

File

print_pdf/print_pdf.module, line 83
Displays Printer-friendly versions of Drupal pages.

Code

function print_pdf_menu() {
  $items = array();
  $items[PRINTPDF_PATH] = array(
    'title' => 'Printer-friendly PDF',
    'page callback' => 'print_pdf_controller',
    'access arguments' => array(
      'access PDF version',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'print_pdf.pages.inc',
  );
  $items[PRINTPDF_PATH . '/' . PRINTPDF_PATH] = array(
    'access callback' => FALSE,
  );
  $items['admin/settings/print/pdf'] = array(
    'title' => 'PDF',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_pdf_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 3,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print_pdf.admin.inc',
  );
  $items['admin/settings/print/pdf/options'] = array(
    'title' => 'Options',
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/print/pdf/strings'] = array(
    'title' => 'Text strings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_pdf_strings_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print_pdf.admin.inc',
  );
  return $items;
}