Conditions | 3 |
Paths | 3 |
Total Lines | 24 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function process(ContainerBuilder $container) |
||
26 | { |
||
27 | if ( |
||
28 | !$container->hasDefinition( |
||
29 | 'ezpublish.search.elasticsearch.content.field_value_mapper.aggregate' |
||
30 | ) |
||
31 | ) { |
||
32 | return; |
||
33 | } |
||
34 | |||
35 | $aggregateFieldValueMapperDefinition = $container->getDefinition( |
||
36 | 'ezpublish.search.elasticsearch.content.field_value_mapper.aggregate' |
||
37 | ); |
||
38 | |||
39 | $taggedServiceIds = $container->findTaggedServiceIds( |
||
40 | 'ezpublish.search.elasticsearch.content.field_value_mapper' |
||
41 | ); |
||
42 | foreach ($taggedServiceIds as $id => $attributes) { |
||
43 | $aggregateFieldValueMapperDefinition->addMethodCall( |
||
44 | 'addMapper', |
||
45 | [new Reference($id)] |
||
46 | ); |
||
47 | } |
||
48 | } |
||
49 | } |
||
50 |