For more information about this repository, visit the project page at https://www.drupal.org/project/twig_tweak
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
553 B
27 lines
553 B
<?php |
|
|
|
/** |
|
* @file |
|
* Primary module hooks for Twig Tweak test module. |
|
*/ |
|
|
|
/** |
|
* Implements hook_page_bottom(). |
|
*/ |
|
function twig_tweak_test_page_bottom(array &$page_bottom) { |
|
$page_bottom['twig_tweak_test']['#theme'] = 'twig_tweak_test'; |
|
} |
|
|
|
/** |
|
* Implements hook_theme(). |
|
*/ |
|
function twig_tweak_test_theme() { |
|
return ['twig_tweak_test' => ['variables' => []]]; |
|
} |
|
|
|
/** |
|
* Prepares variables for twig-tweak-test template. |
|
*/ |
|
function template_preprocess_twig_tweak_test(&$vars) { |
|
$vars['node'] = Drupal::routeMatch()->getParameter('node'); |
|
}
|
|
|