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\ExpressionCode
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)');
}
}