protected function Twig_Node_Module::compileTemplate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Node/Module.php \Twig_Node_Module::compileTemplate()
1 call to Twig_Node_Module::compileTemplate()
- Twig_Node_Module::compile in vendor/
twig/ twig/ lib/ Twig/ Node/ Module.php - Compiles the node to PHP.
File
- vendor/
twig/ twig/ lib/ Twig/ Node/ Module.php, line 59
Class
- Twig_Node_Module
- Represents a module node.
Code
protected function compileTemplate(Twig_Compiler $compiler) {
if (!$this
->getAttribute('index')) {
$compiler
->write('<?php');
}
$this
->compileClassHeader($compiler);
if (count($this
->getNode('blocks')) || count($this
->getNode('traits')) || null === $this
->getNode('parent') || $this
->getNode('parent') instanceof Twig_Node_Expression_Constant || count($this
->getNode('constructor_start')) || count($this
->getNode('constructor_end'))) {
$this
->compileConstructor($compiler);
}
$this
->compileGetParent($compiler);
$this
->compileDisplay($compiler);
$compiler
->subcompile($this
->getNode('blocks'));
$this
->compileMacros($compiler);
$this
->compileGetTemplateName($compiler);
$this
->compileIsTraitable($compiler);
$this
->compileDebugInfo($compiler);
$this
->compileClassFooter($compiler);
}