function ThemeTestHooks::preprocessThemeTestRenderElement
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php \Drupal\theme_test\Hook\ThemeTestHooks::preprocessThemeTestRenderElement()
Prepares variables for test render element templates.
Default template: theme-test-render-element.html.twig.
Parameters
array $variables: An associative array containing:
- elements: An associative array containing the properties of the element.
File
-
core/
modules/ system/ tests/ modules/ theme_test/ src/ Hook/ ThemeTestHooks.php, line 137
Class
- ThemeTestHooks
- Hook implementations for theme_test.
Namespace
Drupal\theme_test\HookCode
public function preprocessThemeTestRenderElement(array &$variables) : void {
$variables['attributes']['data-variables-are-preprocessed'] = TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.