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

Breadcrumb

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

function Compiler::compile

Same name in this branch
  1. 11.1.x vendor/composer/composer/src/Composer/Compiler.php \Composer\Compiler::compile()
  2. 11.1.x vendor/symfony/dependency-injection/Compiler/Compiler.php \Symfony\Component\DependencyInjection\Compiler\Compiler::compile()

Return value

$this

File

vendor/twig/twig/src/Compiler.php, line 67

Class

Compiler
@author Fabien Potencier <fabien@symfony.com>

Namespace

Twig

Code

public function compile(Node $node, int $indentation = 0) {
    $this->reset($indentation);
    $this->didUseEchoStack[] = $this->didUseEcho;
    try {
        $this->didUseEcho = false;
        $node->compile($this);
        if ($this->didUseEcho) {
            trigger_deprecation('twig/twig', '3.9', 'Using "%s" is deprecated, use "yield" instead in "%s", then flag the class with #[\\Twig\\Attribute\\YieldReady].', $this->didUseEcho, \get_class($node));
        }
        return $this;
    } finally {
        $this->didUseEcho = array_pop($this->didUseEchoStack);
    }
}
RSS feed
Powered by Drupal