diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-11-22 12:33:45 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-11-22 12:33:45 +0100 |
commit | 6850169095f099d8fd9f3886e60237134c77ddb4 (patch) | |
tree | b5634b85767175b9963c2acdb0d0876ebec548de /phpBB/phpbb/di/extension | |
parent | 0a49dad1123abe87590f5f40be0d3ad0fa97ea38 (diff) | |
download | forums-6850169095f099d8fd9f3886e60237134c77ddb4.tar forums-6850169095f099d8fd9f3886e60237134c77ddb4.tar.gz forums-6850169095f099d8fd9f3886e60237134c77ddb4.tar.bz2 forums-6850169095f099d8fd9f3886e60237134c77ddb4.tar.xz forums-6850169095f099d8fd9f3886e60237134c77ddb4.zip |
[ticket/13266] Enable the debug extension in the development environment
PHPBB3-13266
Diffstat (limited to 'phpBB/phpbb/di/extension')
-rw-r--r-- | phpBB/phpbb/di/extension/container_configuration.php | 8 | ||||
-rw-r--r-- | phpBB/phpbb/di/extension/core.php | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/phpbb/di/extension/container_configuration.php b/phpBB/phpbb/di/extension/container_configuration.php index 1f1c077472..ee58ec2b74 100644 --- a/phpBB/phpbb/di/extension/container_configuration.php +++ b/phpBB/phpbb/di/extension/container_configuration.php @@ -30,7 +30,13 @@ class container_configuration implements ConfigurationInterface $rootNode = $treeBuilder->root('core'); $rootNode ->children() - ->booleanNode('require_dev_dependencies')->defaultValue(false)->end() + ->booleanNode('require_dev_dependencies')->defaultValue(false)->end() + ->arrayNode('twig') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('enable_debug_extension')->defaultValue(false)->end() + ->end() + ->end() ->end() ; return $treeBuilder; diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index 72d46fb05b..451efc8e35 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -67,6 +67,12 @@ class core extends Extension ); } } + + if ($config['twig']['enable_debug_extension']) + { + $definition = $container->getDefinition('template.twig.extensions.debug'); + $definition->addTag('twig.extension'); + } } /** |