Esempio n. 1
0
 protected function compileDisplayFooter(IfwPsn_Vendor_Twig_Compiler $compiler)
 {
     parent::compileDisplayFooter($compiler);
     $compiler->write("protected function checkSecurity()\n", "{\n")->indent()->write("\$this->env->getExtension('sandbox')->checkSecurity(\n")->indent()->write(!$this->usedTags ? "array(),\n" : "array('" . implode('\', \'', $this->usedTags) . "'),\n")->write(!$this->usedFilters ? "array(),\n" : "array('" . implode('\', \'', $this->usedFilters) . "'),\n")->write(!$this->usedFunctions ? "array()\n" : "array('" . implode('\', \'', $this->usedFunctions) . "')\n")->outdent()->write(");\n")->outdent()->write("}\n\n");
 }
Esempio n. 2
0
 public function embedTemplate(IfwPsn_Vendor_Twig_Node_Module $template)
 {
     $template->setIndex(mt_rand());
     $this->embeddedTemplates[] = $template;
 }