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

AggregateFacetBuilderVisitorPass.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Base\Container\Compiler\Search\Elasticsearch;
8
9 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
10 use Symfony\Component\DependencyInjection\ContainerBuilder;
11 use Symfony\Component\DependencyInjection\Reference;
12
16 class AggregateFacetBuilderVisitorPass implements CompilerPassInterface
17 {
21 public function process(ContainerBuilder $container)
22 {
23 if (
24 !$container->hasDefinition(
25 'ezpublish.search.elasticsearch.content.facet_builder_visitor.aggregate'
26 )
27 ) {
28 return;
29 }
30
31 $aggregateFacetBuilderVisitorDefinition = $container->getDefinition(
32 'ezpublish.search.elasticsearch.content.facet_builder_visitor.aggregate'
33 );
34
35 $taggedServiceIds = $container->findTaggedServiceIds('ezpublish.search.elasticsearch.content.facet_builder_visitor');
36 foreach ($taggedServiceIds as $id => $attributes) {
37 $aggregateFacetBuilderVisitorDefinition->addMethodCall(
38 'addVisitor',
39 [new Reference($id)]
40 );
41 }
42 }
43 }
eZ\Publish\Core\Base\Container\Compiler\Search\Elasticsearch\AggregateFacetBuilderVisitorPass
This compiler pass will register Elasticsearch Search Engine facet builder visitors.
Definition: AggregateFacetBuilderVisitorPass.php:17
eZ\Publish\Core\Base\Container\Compiler\Search\Elasticsearch\AggregateFacetBuilderVisitorPass\process
process(ContainerBuilder $container)
Definition: AggregateFacetBuilderVisitorPass.php:21
eZ\Publish\Core\Base\Container\Compiler\Search\Elasticsearch
Definition: AggregateFacetBuilderVisitorPass.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.