1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/13132] Twig: Add loops content to the root context

PHPBB3-13132
This commit is contained in:
Tristan Darricau
2014-10-07 20:51:08 +02:00
committed by Nicofuma
parent 70990bc86f
commit cf39cfc593
18 changed files with 335 additions and 3 deletions

View File

@@ -352,6 +352,12 @@ class twig extends \phpbb\template\base
// cleanup
unset($vars['loops']['.']);
// Inject in the main context the value added by assign_block_vars() to be able to use directly the Twig loops.
foreach ($vars['loops'] as $key => &$value)
{
$vars[$key] = $value;
}
return $vars;
}