You are here

function printable_preparing_content in Printer and PDF versions for Drupal 8+ 8

Same name and namespace in other branches
  1. 2.x printable.module \printable_preparing_content()

Are we in the process of generating a printable version of content?

Return value

bool Whether we are preparing a printable version of content.

1 call to printable_preparing_content()
printable_theme_suggestions_alter in ./printable.module
Implements hook_theme_suggestions_alter().

File

./printable.module, line 241
Provides printer friendly content entities.

Code

function printable_preparing_content() {
  $match = \Drupal::routeMatch();
  $route = $match
    ->getRouteObject();
  return $route && $route
    ->getPath() == '/node/{entity}/printable/{printable_format}';
}