Navigation Menu

Skip to content

Commit

Permalink
minor #24840 [TwigBundle] Add default Twig templates path as a contai…
Browse files Browse the repository at this point in the history
…ner 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
  • Loading branch information
fabpot committed Nov 10, 2017
2 parents e68919a + 81b38ec commit aaa9f13
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -87,6 +87,7 @@ public function load(array $configs, ContainerBuilder $container)
$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']);
Expand Down

0 comments on commit aaa9f13

Please sign in to comment.