-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NGSTACK-836 add parent child indexing compiler pass
- Loading branch information
Katarina Miočić
committed
Mar 25, 2024
1 parent
ad0b014
commit 0aaa15b
Showing
9 changed files
with
63 additions
and
31 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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Netgen\IbexaSearchExtra\Container\Compiler; | ||
|
||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
class ParentChildIndexingPass implements CompilerPassInterface | ||
{ | ||
private const ParentChildIndexerTag = 'netgen.parent_child_indexer.message_handler'; | ||
private const MessageHandlerTag = 'messenger.message_handler'; | ||
|
||
public function process(ContainerBuilder $container) :void | ||
{ | ||
$useParentChildIndexing = $container->getParameter( | ||
'netgen_ibexa_search_extra.use_parent_child_indexing', | ||
); | ||
|
||
if ($useParentChildIndexing !== true) { | ||
return; | ||
} | ||
|
||
$serviceIds =$container->findTaggedServiceIds(self::ParentChildIndexerTag); | ||
|
||
foreach ($serviceIds as $serviceId => $tag) { | ||
$definition = $container->getDefinition($serviceId); | ||
$definition->addTag(self::MessageHandlerTag); | ||
} | ||
|
||
} | ||
} |
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
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
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