| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function process(ContainerBuilder $container): void |
||
| 21 | { |
||
| 22 | if (!$container->hasDefinition('admin.manager') |
||
| 23 | || !$container->hasDefinition('admin.manager.visitor.element_collection') |
||
| 24 | ) { |
||
| 25 | return; |
||
| 26 | } |
||
| 27 | |||
| 28 | $elements = []; |
||
| 29 | $elementServices = $container->findTaggedServiceIds('admin.element'); |
||
| 30 | foreach (array_keys($elementServices) as $id) { |
||
| 31 | $elements[] = new Reference((string) $id); |
||
| 32 | } |
||
| 33 | |||
| 34 | $container->findDefinition('admin.manager.visitor.element_collection') |
||
| 35 | ->replaceArgument(0, $elements); |
||
| 36 | } |
||
| 38 |