public function ThemeTestController::testTemplate in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testTemplate()
Tests template overriding based on filename.
Return value
array A render array containing a theme override.
1 string reference to 'ThemeTestController::testTemplate'
- theme_test.routing.yml in core/
modules/ system/ tests/ modules/ theme_test/ theme_test.routing.yml - core/modules/system/tests/modules/theme_test/theme_test.routing.yml
File
- core/
modules/ system/ tests/ modules/ theme_test/ src/ ThemeTestController.php, line 35
Class
- ThemeTestController
- Controller routines for theme test routes.
Namespace
Drupal\theme_testCode
public function testTemplate() {
return [
'#markup' => \Drupal::theme()
->render('theme_test_template_test', []),
];
}