You are here

function template_preprocess_theme_test_render_element in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/theme_test/theme_test.module \template_preprocess_theme_test_render_element()
  2. 10 core/modules/system/tests/modules/theme_test/theme_test.module \template_preprocess_theme_test_render_element()

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/theme_test.module, line 110
Test module.

Code

function template_preprocess_theme_test_render_element(&$variables) {
  $variables['attributes']['data-variables-are-preprocessed'] = TRUE;
}