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

CriterionFieldValueHandlerRegistryPass.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Base\Container\Compiler\Search\Legacy;
8
9 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
10 use Symfony\Component\DependencyInjection\ContainerBuilder;
11 use Symfony\Component\DependencyInjection\Exception\LogicException;
12 use Symfony\Component\DependencyInjection\Reference;
13
17 class CriterionFieldValueHandlerRegistryPass implements CompilerPassInterface
18 {
22 public function process(ContainerBuilder $container)
23 {
24 if (!$container->hasDefinition('ezpublish.search.legacy.gateway.criterion_field_value_handler.registry')) {
25 return;
26 }
27
28 $registry = $container->getDefinition('ezpublish.search.legacy.gateway.criterion_field_value_handler.registry');
29
30 foreach ($container->findTaggedServiceIds('ezpublish.search.legacy.gateway.criterion_field_value_handler') as $id => $attributes) {
31 foreach ($attributes as $attribute) {
32 if (!isset($attribute['alias'])) {
33 throw new LogicException(
34 'ezpublish.search.legacy.gateway.criterion_field_value_handler service tag needs an "alias" attribute to identify the field type. None given.'
35 );
36 }
37
38 $registry->addMethodCall(
39 'register',
40 [
41 $attribute['alias'],
42 new Reference($id),
43 ]
44 );
45 }
46 }
47 }
48 }
eZ\Publish\Core\Base\Container\Compiler\Search\Legacy\CriterionFieldValueHandlerRegistryPass
This compiler pass will register Legacy Search Engine criterion field value handlers.
Definition: CriterionFieldValueHandlerRegistryPass.php:18
eZ\Publish\Core\Base\Container\Compiler\Search\Legacy\CriterionFieldValueHandlerRegistryPass\process
process(ContainerBuilder $container)
Definition: CriterionFieldValueHandlerRegistryPass.php:22
eZ\Publish\Core\Base\Container\Compiler\Search\Legacy
Definition: CriteriaConverterPass.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.