theme_test.module
Same filename and directory in other branches
File
-
core/
modules/ system/ tests/ modules/ theme_test/ theme_test.module
View source
<?php
/**
* @file
* Test module.
*/
declare (strict_types=1);
/**
* Prepares variables for test render element templates.
*
* Default template: theme-test-render-element.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the properties of the element.
*/
function template_preprocess_theme_test_render_element(&$variables) : void {
$variables['attributes']['data-variables-are-preprocessed'] = TRUE;
}
/**
* Implements template_preprocess_HOOK() for theme_test_registered_by_module.
*/
function template_preprocess_theme_test_registered_by_module() : void {
}
/**
* Implements template_preprocess_HOOK() for theme_test_deprecations_preprocess.
*
* Default template: theme-test-deprecations-preprocess.html.twig.
*
* @param array $variables
* An associative array of variables.
*/
function template_preprocess_theme_test_deprecations_preprocess(array &$variables) : void {
$variables = array_merge($variables, \Drupal::state()->get('theme_test.theme_test_deprecations_preprocess'));
}
Functions
Title | Deprecated | Summary |
---|---|---|
template_preprocess_theme_test_deprecations_preprocess | Implements template_preprocess_HOOK() for theme_test_deprecations_preprocess. | |
template_preprocess_theme_test_registered_by_module | Implements template_preprocess_HOOK() for theme_test_registered_by_module. | |
template_preprocess_theme_test_render_element | Prepares variables for test render element templates. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.