Skip to content

Commit

Permalink
Improved autowiring support for templating helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
XWB committed Jun 7, 2018
1 parent c7237aa commit 059501b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/DependencyInjection/SonataIntlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function load(array $configs, ContainerBuilder $container)
$config = $processor->processConfiguration($configuration, $configs);

$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('autowire.xml');
$loader->load('intl.xml');

$this->configureTimezone($container, $config);
Expand Down
8 changes: 8 additions & 0 deletions src/Resources/config/autowire.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="Sonata\IntlBundle\Templating\Helper\DateTimeHelper" alias="sonata.intl.templating.helper.datetime">
<service id="Sonata\IntlBundle\Templating\Helper\LocaleHelper" alias="sonata.intl.templating.helper.locale">
<service id="Sonata\IntlBundle\Templating\Helper\NumberHelper" alias="sonata.intl.templating.helper.number">
</services>
</container>

0 comments on commit 059501b

Please sign in to comment.