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

Breadcrumb

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

function ParentExpression::compile

Overrides Node::compile

File

vendor/twig/twig/src/Node/Expression/ParentExpression.php, line 29

Class

ParentExpression
Represents a parent node.

Namespace

Twig\Node\Expression

Code

public function compile(Compiler $compiler) : void {
    if ($this->getAttribute('output')) {
        $compiler->addDebugInfo($this)
            ->write('yield from $this->yieldParentBlock(')
            ->string($this->getAttribute('name'))
            ->raw(", \$context, \$blocks);\n");
    }
    else {
        $compiler->raw('$this->renderParentBlock(')
            ->string($this->getAttribute('name'))
            ->raw(', $context, $blocks)');
    }
}
RSS feed
Powered by Drupal