function ThemeTestController::testTemplate
Same name in other branches
- 9 core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testTemplate()
- 8.9.x core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testTemplate()
- 11.x 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', []),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.