| Conditions | 5 |
| Paths | 5 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function process(ContainerBuilder $container) |
||
| 16 | { |
||
| 17 | if (!$container->hasDefinition('victoire_view_reference.builder_chain')) { |
||
| 18 | return; |
||
| 19 | } |
||
| 20 | $definition = $container->getDefinition( |
||
| 21 | 'victoire_view_reference.builder_chain' |
||
| 22 | ); |
||
| 23 | $taggedServices = $container->findTaggedServiceIds( |
||
| 24 | 'victoire_view_reference.view_reference.builder' |
||
| 25 | ); |
||
| 26 | foreach ($taggedServices as $id => $tagAttributes) { |
||
| 27 | foreach ($tagAttributes as $attributes) { |
||
| 28 | if (!array_key_exists('view', $attributes)) { |
||
| 29 | throw new InvalidConfigurationException('View class attribute is not defined for '.$id); |
||
| 30 | } |
||
| 31 | $definition->addMethodCall( |
||
| 32 | 'addViewReferenceBuilder', |
||
| 33 | [new Reference($id), $attributes['view']] |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 |