| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | public function process(ContainerBuilder $container) |
||
| 12 | { |
||
| 13 | if (!$container->has('lag.admin.factory')) { |
||
| 14 | return; |
||
| 15 | } |
||
| 16 | |||
| 17 | $definition = $container->findDefinition('lag.admin.factory'); |
||
| 18 | $taggedServices = $container->findTaggedServiceIds('data_provider'); |
||
| 19 | |||
| 20 | foreach ($taggedServices as $id => $tags) { |
||
| 21 | $definition->addMethodCall( |
||
| 22 | 'addDataProvider', |
||
| 23 | [ |
||
| 24 | $id, |
||
| 25 | new Reference($id), |
||
| 26 | ] |
||
| 27 | ); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | } |
||
| 31 |