diff options
| author | Oliver Schramm <oliver.schramm97@gmail.com> | 2015-05-16 00:30:19 +0200 |
|---|---|---|
| committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2015-05-16 00:30:19 +0200 |
| commit | cddecec14647c980a688dc81834df2eae48e88bb (patch) | |
| tree | 6480e240bed44e922e1f53585133c7a30d8d8469 /phpBB/phpbb/di/extension/core.php | |
| parent | c1ab364e28ad628b3942fb9b9945751830647521 (diff) | |
| parent | f821130c3a4a22efd491aaad962cc84a82dde56a (diff) | |
| download | forums-cddecec14647c980a688dc81834df2eae48e88bb.tar forums-cddecec14647c980a688dc81834df2eae48e88bb.tar.gz forums-cddecec14647c980a688dc81834df2eae48e88bb.tar.bz2 forums-cddecec14647c980a688dc81834df2eae48e88bb.tar.xz forums-cddecec14647c980a688dc81834df2eae48e88bb.zip | |
Merge pull request #3591 from Nicofuma/ticket/12632
[ticket/12632] Add twig.debug and twig.auto_reload in config.yml
Diffstat (limited to 'phpBB/phpbb/di/extension/core.php')
| -rw-r--r-- | phpBB/phpbb/di/extension/core.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index c71dc61280..c9e2d4dc5b 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -69,6 +69,20 @@ class core extends Extension } } + // Set the Twig options if defined in the environment + $definition = $container->getDefinition('template.twig.environment'); + $twig_environment_options = $definition->getArgument(6); + if ($config['twig']['debug']) + { + $twig_environment_options['debug'] = true; + } + if ($config['twig']['auto_reload']) + { + $twig_environment_options['auto_reload'] = true; + } + // Replace the 6th argument, the options passed to the environment + $definition->replaceArgument(6, $twig_environment_options); + if ($config['twig']['enable_debug_extension']) { $definition = $container->getDefinition('template.twig.extensions.debug'); |
