You are here

public function TwigExtensionTestController::testFilterRender in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php \Drupal\twig_extension_test\TwigExtensionTestController::testFilterRender()

Menu callback for testing Twig filters in a Twig template.

1 string reference to 'TwigExtensionTestController::testFilterRender'
twig_extension_test.routing.yml in core/modules/system/tests/modules/twig_extension_test/twig_extension_test.routing.yml
core/modules/system/tests/modules/twig_extension_test/twig_extension_test.routing.yml

File

core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php, line 21
Contains \Drupal\twig_extension_test\TwigExtensionTestController.

Class

TwigExtensionTestController
Controller routines for Twig extension test routes.

Namespace

Drupal\twig_extension_test

Code

public function testFilterRender() {
  return array(
    '#theme' => 'twig_extension_test_filter',
    '#message' => 'Every animal is not a mineral.',
    '#safe_join_items' => [
      '<em>will be escaped</em>',
      $this
        ->t('<em>will be markup</em>'),
      [
        '#markup' => '<strong>will be rendered</strong>',
      ],
    ],
  );
}