37 $compiler->
write(
"\$this->checkSecurity();\n");
39 parent::compileDisplayBody($compiler);
44 parent::compileDisplayFooter($compiler);
47 ->
write(
"protected function checkSecurity()\n",
"{\n")
49 ->write(
"\$this->env->getExtension('sandbox')->checkSecurity(\n")
51 ->write(!$this->usedTags ?
"array(),\n" :
"array('".implode(
'\', \
'', $this->usedTags).
"'),\n")
52 ->write(!$this->usedFilters ?
"array(),\n" :
"array('".implode(
'\', \
'', $this->usedFilters).
"'),\n")
53 ->write(!$this->usedFunctions ?
"array()\n" :
"array('".implode(
'\', \
'', $this->usedFunctions).
"')\n")
Represents a module node.
__construct(Twig_Node_Module $node, array $usedFilters, array $usedTags, array $usedFunctions)
Compiles a node to PHP code.
getAttribute($name)
Gets an attribute.
setAttribute($name, $value)
Sets an attribute.
compileDisplayFooter(Twig_Compiler $compiler)
Represents a module node.
compileDisplayBody(Twig_Compiler $compiler)
write()
Writes a string to the compiled code by adding indentation.
getNode($name)
Gets a node by name.