You are here

protected function Twig_Node_Module::compileDisplayBody in Translation template extractor 6.3

2 calls to Twig_Node_Module::compileDisplayBody()
Twig_Node_Module::compileTemplate in vendor/Twig/Node/Module.php
Twig_Node_SandboxedModule::compileDisplayBody in vendor/Twig/Node/SandboxedModule.php
1 method overrides Twig_Node_Module::compileDisplayBody()
Twig_Node_SandboxedModule::compileDisplayBody in vendor/Twig/Node/SandboxedModule.php

File

vendor/Twig/Node/Module.php, line 107

Class

Twig_Node_Module
Represents a module node.

Code

protected function compileDisplayBody(Twig_Compiler $compiler) {
  $compiler
    ->subcompile($this
    ->getNode('body'));
  if (null !== $this
    ->getNode('parent')) {
    if ($this
      ->getNode('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");
  }
}