-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MateuszKolankowski
committed
Feb 17, 2025
1 parent
bb67a79
commit a1bd506
Showing
18 changed files
with
2 additions
and
731 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
src/lib/Container/Compiler/AggregateFacetBuilderVisitorPass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +0,0 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
|
||
namespace Ibexa\Solr\Container\Compiler; | ||
|
||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
/** | ||
* This compiler pass will register Solr Storage facet builder visitors. | ||
*/ | ||
class AggregateFacetBuilderVisitorPass implements CompilerPassInterface | ||
{ | ||
public function process(ContainerBuilder $container): void | ||
{ | ||
$this->processVisitors($container, 'content'); | ||
$this->processVisitors($container, 'location'); | ||
} | ||
|
||
private function processVisitors(ContainerBuilder $container, string $name = 'content'): void | ||
{ | ||
if (!$container->hasDefinition("ibexa.solr.query.$name.facet_builder_visitor.aggregate")) { | ||
return; | ||
} | ||
|
||
$aggregateFacetBuilderVisitorDefinition = $container->getDefinition( | ||
"ibexa.solr.query.$name.facet_builder_visitor.aggregate" | ||
); | ||
|
||
foreach ($container->findTaggedServiceIds("ibexa.search.solr.query.$name.facet_builder.visitor") as $id => $attributes) { | ||
$aggregateFacetBuilderVisitorDefinition->addMethodCall( | ||
'addVisitor', | ||
[ | ||
new Reference($id), | ||
] | ||
); | ||
} | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.