protected function Twig_Node_Module::compileDisplay in Translation template extractor 7.3
1 call to Twig_Node_Module::compileDisplay()
- Twig_Node_Module::compileTemplate in vendor/
Twig/ Node/ Module.php
File
- vendor/
Twig/ Node/ Module.php, line 271
Class
- Twig_Node_Module
- Represents a module node.
Code
protected function compileDisplay(Twig_Compiler $compiler) {
$compiler
->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n")
->indent()
->subcompile($this
->getNode('display_start'))
->subcompile($this
->getNode('body'));
if (null !== ($parent = $this
->getNode('parent'))) {
$compiler
->addDebugInfo($parent);
if ($parent instanceof Twig_Node_Expression_Constant) {
$compiler
->write('$this->parent');
}
else {
$compiler
->write('$this->getParent($context)');
}
$compiler
->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
}
$compiler
->subcompile($this
->getNode('display_end'))
->outdent()
->write("}\n\n");
}