You are here

public function TwigThemeTestController::placeholderOutsideTransRender in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php \Drupal\twig_theme_test\TwigThemeTestController::placeholderOutsideTransRender()
  2. 9 core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php \Drupal\twig_theme_test\TwigThemeTestController::placeholderOutsideTransRender()

Controller for testing the twig placeholder filter outside of {% trans %}.

1 string reference to 'TwigThemeTestController::placeholderOutsideTransRender'
twig_theme_test.routing.yml in core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml
core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml

File

core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php, line 32

Class

TwigThemeTestController
Controller routines for Twig theme test routes.

Namespace

Drupal\twig_theme_test

Code

public function placeholderOutsideTransRender() {
  return [
    '#theme' => 'twig_theme_test_placeholder_outside_trans',
    '#var' => '<script>alert(123);</script>',
  ];
}