function DeprecatedTwigTemplateController::deprecatedTwigTemplate

Same name in other branches
  1. 10 core/modules/system/tests/modules/deprecated_twig_template/src/Controller/DeprecatedTwigTemplateController.php \Drupal\deprecated_twig_template\Controller\DeprecatedTwigTemplateController::deprecatedTwigTemplate()

Display the deprecated template with a message.

Return value

array Render array containing the deprecated template.

1 string reference to 'DeprecatedTwigTemplateController::deprecatedTwigTemplate'
deprecated_twig_template.routing.yml in core/modules/system/tests/modules/deprecated_twig_template/deprecated_twig_template.routing.yml
core/modules/system/tests/modules/deprecated_twig_template/deprecated_twig_template.routing.yml

File

core/modules/system/tests/modules/deprecated_twig_template/src/Controller/DeprecatedTwigTemplateController.php, line 20

Class

DeprecatedTwigTemplateController
Controller for calling a deprecated theme.

Namespace

Drupal\deprecated_twig_template\Controller

Code

public function deprecatedTwigTemplate() {
    return [
        '#theme' => 'deprecated_template',
        '#message' => 'This is a deprecated template. Use an alternative template.',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.