function template_preprocess_theme_test_render_element

Same name and namespace in other branches
  1. 8.9.x 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()
  3. 11.x 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 123

Code

function template_preprocess_theme_test_render_element(&$variables) {
    $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.