aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/config
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/config')
-rw-r--r--phpBB/config/services.yml4
-rw-r--r--phpBB/config/twig.yml36
2 files changed, 40 insertions, 0 deletions
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
index a588046245..751aea03ae 100644
--- a/phpBB/config/services.yml
+++ b/phpBB/config/services.yml
@@ -10,6 +10,7 @@ imports:
- { resource: mimetype_guessers.yml }
- { resource: passwords.yml }
- { resource: profilefields.yml }
+ - { resource: twig.yml }
- { resource: captcha.yml }
- { resource: parameters.yml }
@@ -341,6 +342,9 @@ services:
- @config
- @user
- @template_context
+ - @template.twig.environment
+ - %core.template.cache_path%
+ - @template.twig.extensions.collection
- @ext.manager
template_context:
diff --git a/phpBB/config/twig.yml b/phpBB/config/twig.yml
new file mode 100644
index 0000000000..eb3e6c0924
--- /dev/null
+++ b/phpBB/config/twig.yml
@@ -0,0 +1,36 @@
+parameters:
+ core.template.cache_path: %core.root_path%cache/twig/
+
+services:
+ template.twig.environment:
+ class: phpbb\template\twig\environment
+ arguments:
+ - @config
+ - @path_helper
+ - @service_container
+ - %core.template.cache_path%
+ - @ext.manager
+ - @template.twig.loader
+
+ template.twig.lexer:
+ class: phpbb\template\twig\lexer
+ arguments:
+ - @template.twig.environment
+
+ template.twig.loader:
+ class: phpbb\template\twig\loader
+
+ template.twig.extensions.collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: twig.extension }
+
+ template.twig.extensions.phpbb:
+ class: phpbb\template\twig\extension
+ arguments:
+ - @template_context
+ - @user
+ tags:
+ - { name: twig.extension }