Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function process(ContainerBuilder $container): void |
||
12 | { |
||
13 | if (!$container->has('sitemap.providers')) { |
||
14 | return; |
||
15 | } |
||
16 | |||
17 | $definition = $container->findDefinition('sitemap.providers'); |
||
18 | $taggedServices = $container->findTaggedServiceIds('sitemap.provider'); |
||
19 | |||
20 | foreach ($taggedServices as $id => $tags) { |
||
21 | // add the SitemapProvider service to the SitemapProviders service |
||
22 | $definition->addMethodCall('add', [ |
||
23 | new Reference($id), |
||
24 | ]); |
||
28 |