public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition($this->factoryId)) {
return;
}
$searchEngineIndexerFactoryDefinition = $container->getDefinition($this->factoryId);
foreach ($container->findTaggedServiceIds('ezpublish.searchEngineIndexer') as $id => $attributes) {
foreach ($attributes as $attribute) {
if (!isset($attribute['alias'])) {
throw new LogicException('ezpublish.searchEngineIndexer service tag needs an "alias" attribute to ' . 'identify the search engine. None given.');
}
// Register the search engine with the search engine factory
$searchEngineIndexerFactoryDefinition->addMethodCall('registerSearchEngineIndexer', [new Reference($id), $attribute['alias']]);
}
}
}