function printable_preparing_pdf in Printer and PDF versions for Drupal 8+ 8
Same name and namespace in other branches
- 2.x printable.module \printable_preparing_pdf()
Are we in the process of generating a PDF?
Return value
bool Whether we are preparing a PDF.
2 calls to printable_preparing_pdf()
- printable_file_url_alter in ./
printable.module - Make file urls absolute if we're generating a PDF.
- printable_link_alter in ./
printable.module - Make Link URLs absolute if we're generating a PDF.
File
- ./
printable.module, line 255 - Provides printer friendly content entities.
Code
function printable_preparing_pdf() {
$match = \Drupal::routeMatch();
$route = $match
->getRouteObject();
return $route && $route
->getPath() == '/node/{entity}/printable/{printable_format}' && $match
->getParameter('printable_format') == 'pdf';
}