Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function process(ContainerBuilder $container): void |
||
23 | { |
||
24 | if (!$container->has('bitbag_sylius_cms_plugin.importer.chain')) { |
||
25 | return; |
||
26 | } |
||
27 | |||
28 | $container |
||
29 | ->registerForAutoconfiguration(ImporterInterface::class) |
||
30 | ->addTag('bitbag.importer') |
||
31 | ; |
||
32 | |||
33 | $taggedServices = $container->findTaggedServiceIds('bitbag.importer'); |
||
34 | $definition = $container->findDefinition('bitbag_sylius_cms_plugin.importer.chain'); |
||
35 | |||
36 | foreach ($taggedServices as $id => $tags) { |
||
37 | $definition->addMethodCall('addImporter', [new Reference($id)]); |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 |