$loaderReflection = new \ReflectionClass($loaderDefinition->getClass());
28
29
if (!$loaderReflection->implementsInterface(LoaderBridgeInterface::class)) {
30
throw new \RuntimeException(sprintf('The loader "%s" have to implement "%s" because it is tagged as "majora.loader_bridge.form".', $loaderDefinition->getClass(), LoaderBridgeInterface::class));
31
}
32
33
foreach ($tags as $attributes) {
34
if (!isset($attributes['alias'])) {
35
throw new \RuntimeException('Alias required for "majora.loader_bridge.form" tag.');
36
}
37
38
$entityCollectionType->addMethodCall(
39
'registerLoader',
40
array($attributes['alias'], new Reference($loaderId))