TwigExtensionTestController.php in Zircon Profile 8
File
core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php
View source
<?php
namespace Drupal\twig_extension_test;
use Drupal\Core\StringTranslation\StringTranslationTrait;
class TwigExtensionTestController {
use StringTranslationTrait;
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>',
],
],
);
}
public function testFunctionRender() {
return array(
'#theme' => 'twig_extension_test_function',
);
}
}