You are here

function print_pdf_menu in Printer, email and PDF versions 5.4

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

Implementation of hook_menu().

File

print_pdf/print_pdf.module, line 51

Code

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