;
} else {
$compiler
- ->write("\$this->parent = ")
+ ->write("\$parent = ")
->subcompile($this->parent)
->raw(";\n")
- ->write("if (!\$this->parent")
+ ->write("if (!\$parent")
->raw(" instanceof Twig_Template) {\n")
->indent()
- ->write("\$this->parent = clone \$this->env->loadTemplate(\$this->parent);\n")
+ ->write("\$parent = \$this->env->loadTemplate(\$parent);\n")
->outdent()
->write("}\n")
+ ->write("\$this->parent = clone \$parent;\n")
;
}
public function display(array \$context)
{
if (null === \$this->parent) {
- \$this->parent = (true) ? ("foo") : ("foo");
- if (!\$this->parent instanceof Twig_Template) {
- \$this->parent = clone \$this->env->loadTemplate(\$this->parent);
+ \$parent = (true) ? ("foo") : ("foo");
+ if (!\$parent instanceof Twig_Template) {
+ \$parent = \$this->env->loadTemplate(\$parent);
}
+ \$this->parent = clone \$parent;
\$this->parent->pushBlocks(\$this->blocks);
}
\$this->parent->display(\$context);