| Conditions | 4 |
| Paths | 4 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function process(ContainerBuilder $container) |
||
| 17 | { |
||
| 18 | $managerId = 'as3_post_process.task.manager'; |
||
| 19 | if (!$container->hasDefinition($managerId)) { |
||
| 20 | return; |
||
| 21 | } |
||
| 22 | // Get the manager service definition |
||
| 23 | $definition = $container->getDefinition($managerId); |
||
| 24 | |||
| 25 | // Get the tagged plugins |
||
| 26 | $tag = 'as3_post_process.plugin'; |
||
| 27 | $plugins = $container->findTaggedServiceIds($tag); |
||
| 28 | |||
| 29 | foreach ($plugins as $id => $tagAttributes) { |
||
| 30 | foreach ($tagAttributes as $attributes) { |
||
| 31 | // Add the plugin to the manager service definition |
||
| 32 | $definition->addMethodCall( |
||
| 33 | 'addPlugin', |
||
| 34 | [new Reference($id)] |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 | } |
||
| 40 |