optimized parent template creation when the template does not use dynamic inheritance

This commit is contained in:
Fabien Potencier
2012-03-30 21:05:14 +02:00
parent 6e2fd68e7b
commit 1e9a1ae0be
5 changed files with 27 additions and 9 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
protected function doDisplay(array \$context, array \$blocks = array())
{
\$context["macro"] = \$this->env->loadTemplate("foo.twig");
\$this->getParent(\$context)->display(\$context, array_merge(\$this->blocks, \$blocks));
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
}
public function getTemplateName()
+1 -1
View File
@@ -118,7 +118,7 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
protected function doDisplay(array \$context, array \$blocks = array())
{
\$this->checkSecurity();
\$this->getParent(\$context)->display(\$context, array_merge(\$this->blocks, \$blocks));
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
}
protected function checkSecurity() {