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

Breadcrumb

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

function PrintNode::compile

Overrides Node::compile

File

vendor/twig/twig/src/Node/PrintNode.php, line 32

Class

PrintNode
Represents a node that outputs an expression.

Namespace

Twig\Node

Code

public function compile(Compiler $compiler) : void {
    
    /** @var AbstractExpression */
    $expr = $this->getNode('expr');
    $compiler->addDebugInfo($this)
        ->write($expr->isGenerator() ? 'yield from ' : 'yield ')
        ->subcompile($expr)
        ->raw(";\n");
}
RSS feed
Powered by Drupal