Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Environment.php

function Environment::display

Displays a template.

Parameters

string|TemplateWrapper $name The template name:

Throws

LoaderError When the template cannot be found

SyntaxError When an error occurred during compilation

RuntimeError When an error occurred during rendering

File

vendor/twig/twig/src/Environment.php, line 332

Class

Environment
Stores the Twig configuration and renders templates.

Namespace

Twig

Code

public function display($name, array $context = []) : void {
    $this->load($name)
        ->display($context);
}
RSS feed
Powered by Drupal