You are here

public function ThemeTestController::testTemplate in Zircon Profile 8.0

Same name and namespace in other branches
  1. 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 52
Contains \Drupal\theme_test\ThemeTestController.

Class

ThemeTestController
Controller routines for theme test routes.

Namespace

Drupal\theme_test

Code

public function testTemplate() {
  return [
    '#markup' => \Drupal::theme()
      ->render('theme_test_template_test', array()),
  ];
}