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
-------
81b38ec215
[TwigBundle] Add default Twig templates path as a container param
This commit is contained in:
commit
aaa9f13b57
@ -87,6 +87,7 @@ class TwigExtension extends Extension
|
||||
$container->setParameter('twig.exception_listener.controller', $config['exception_controller']);
|
||||
|
||||
$container->setParameter('twig.form.resources', $config['form_themes']);
|
||||
$container->setParameter('twig.default_path', $config['default_path']);
|
||||
|
||||
$envConfiguratorDefinition = $container->getDefinition('twig.configurator.environment');
|
||||
$envConfiguratorDefinition->replaceArgument(0, $config['date']['format']);
|
||||
|
Reference in New Issue
Block a user