Conditions | 4 |
Paths | 6 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function process(ContainerBuilder $container): void |
||
29 | { |
||
30 | $availableManagers = []; |
||
31 | |||
32 | foreach ($container->findTaggedServiceIds(self::MANAGER_TAG) as $id => $tags) { |
||
33 | $availableManagers[$id] = $container->findDefinition($id); |
||
34 | } |
||
35 | |||
36 | if (!empty($availableManagers)) { |
||
37 | $bundles = $container->getParameter('kernel.bundles'); |
||
38 | if (isset($bundles['MakerBundle'])) { |
||
39 | $adminMakerDefinition = $container->getDefinition('sonata.admin.maker'); |
||
40 | $adminMakerDefinition->replaceArgument(1, $availableManagers); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 |