aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/di/extension
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/di/extension')
-rw-r--r--phpBB/phpbb/di/extension/container_configuration.php8
-rw-r--r--phpBB/phpbb/di/extension/core.php6
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');
+ }
}
/**