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

Breadcrumb

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

function Compiler::subcompile

Return value

$this

File

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

Class

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

Namespace

Twig

Code

public function subcompile(Node $node, bool $raw = true) {
    if (!$raw) {
        $this->source .= str_repeat(' ', $this->indentation * 4);
    }
    $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);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal