| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function process(ContainerBuilder $container) |
||
| 22 | { |
||
| 23 | if (false === $container->hasDefinition('run_open_code.query_resources_loader.twig')) { |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | $definition = $container->getDefinition('run_open_code.query_resources_loader.twig'); |
||
| 28 | |||
| 29 | // Extensions must always be registered before everything else. |
||
| 30 | // For instance, global variable definitions must be registered |
||
| 31 | // afterward. If not, the globals from the extensions will never |
||
| 32 | // be registered. |
||
| 33 | $calls = $definition->getMethodCalls(); |
||
| 34 | |||
| 35 | $definition->setMethodCalls(array()); |
||
| 36 | |||
| 37 | foreach ($container->findTaggedServiceIds('run_open_code.query_resources_loader.twig.extension') as $id => $attributes) { |
||
| 38 | $definition->addMethodCall('addExtension', array(new Reference($id))); |
||
| 39 | } |
||
| 40 | |||
| 41 | $definition->setMethodCalls(array_merge($definition->getMethodCalls(), $calls)); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |