mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[feature/twig] BEGIN loops now work
PHPBB3-11598
This commit is contained in:
@@ -45,10 +45,9 @@ class phpbb_template_twig_node_begin extends Twig_Node
|
||||
}
|
||||
|
||||
$compiler
|
||||
->write("if (isset(\$context['loop'])) {")
|
||||
->write("foreach (\$context['loop']['")
|
||||
->write($this->getAttribute('beginName'))
|
||||
->write("'] as \$loops[\$nestingLevel]['i'] => \$loops[\$nestingLevel]['values']) {")
|
||||
->write("if (isset(\$context['loop']['" . $this->getAttribute('beginName') . "'])) {")
|
||||
->write("foreach (\$context['loop']['". $this->getAttribute('beginName'). "'] as \$" . $this->getAttribute('beginName') . ") {")
|
||||
->write("\$context['". $this->getAttribute('beginName'). "'] = \$" . $this->getAttribute('beginName') . ";")
|
||||
->indent()
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user