Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

LocalePass.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler;
8
9 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
10 use Symfony\Component\DependencyInjection\ContainerBuilder;
11 use Symfony\Component\DependencyInjection\Reference;
12
16 class LocalePass implements CompilerPassInterface
17 {
23 public function process(ContainerBuilder $container)
24 {
25 if (!$container->hasDefinition('locale_listener')) {
26 return;
27 }
28
29 $localeListenerDef = $container->getDefinition('locale_listener');
30 // Injecting the service container for lazy loading purpose, since all event listeners are instantiated before events are triggered
31 $localeListenerDef->addMethodCall('setConfigResolver', [new Reference('ezpublish.config.resolver')]);
32 $localeListenerDef->addMethodCall('setLocaleConverter', [new Reference('ezpublish.locale.converter')]);
33 }
34 }
eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\LocalePass
This compiler pass will tweak the locale_listener service.
Definition: LocalePass.php:17
eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\LocalePass\process
process(ContainerBuilder $container)
Definition: LocalePass.php:23
eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler
Definition: AsseticPass.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.