You are here

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

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

Implements hook_theme().

File

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

Code

function printable_theme() {
  $module_path = drupal_get_path('module', 'printable');
  return [
    'printable_navigation' => [
      'variables' => [
        'printable_link' => NULL,
      ],
    ],
    'printable' => [
      'template' => 'printable',
      'pattern' => 'printable__',
      'variables' => [
        'header' => NULL,
        'content' => NULL,
        'footer' => NULL,
      ],
      'path' => $module_path . '/templates',
    ],
    'printable_header' => [
      'template' => 'printable-header',
      'pattern' => 'printable_header__',
      'variables' => [
        'logo_url' => NULL,
      ],
      'path' => $module_path . '/templates',
    ],
    'printable_footer' => [
      'template' => 'printable-footer',
      'pattern' => 'printable_footer__',
      'variables' => [
        'footer_content' => NULL,
      ],
      'path' => $module_path . '/templates',
    ],
  ];
}