public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('ezpublish.search.common.field_registry')) {
return;
}
$fieldRegistryDefinition = $container->getDefinition('ezpublish.search.common.field_registry');
foreach ($container->findTaggedServiceIds('ezpublish.fieldType.indexable') as $id => $attributes) {
foreach ($attributes as $attribute) {
if (!isset($attribute['alias'])) {
throw new LogicException('ezpublish.fieldType.indexable service tag needs an "alias" attribute to ' . 'identify the indexable field type. None given.');
}
$fieldRegistryDefinition->addMethodCall('registerType', array($attribute['alias'], new Reference($id)));
}
}
}