8000 minor #24840 [TwigBundle] Add default Twig templates path as a contai… · symfony/symfony@aaa9f13 · GitHub
[go: up one dir, main page]

Skip to content

Commit aaa9f13

Browse files
committed
minor #24840 [TwigBundle] Add default Twig templates path as a container param (emodric)
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBundle] Add default Twig templates path as a container param | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24839 | License | MIT | Doc PR | N/A Adds a `twig.default_path` container param for easier access to this config in compiler passes. Commits ------- 81b38ec [TwigBundle] Add default Twig templates path as a container param
2 parents e68919a + 81b38ec commit aaa9f13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 1 addition & 0 deletions
699D
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public function load(array $configs, ContainerBuilder $container)
8787
$container->setParameter('twig.exception_listener.controller', $config['exception_controller']);
8888

8989
$container->setParameter('twig.form.resources', $config['form_themes']);
90+
$container->setParameter('twig.default_path', $config['default_path']);
9091

9192
$envConfiguratorDefinition = $container->getDefinition('twig.configurator.environment');
9293
$envConfiguratorDefinition->replaceArgument(0, $config['date']['format']);

0 commit comments

Comments
 (0)
0