function 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 87

Class

ThemeTestHooks
Hook implementations for theme_test.

Namespace

Drupal\theme_test\Hook

Code

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.