| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function process(ContainerBuilder $container) |
||
| 21 | { |
||
| 22 | if (!$container->hasDefinition('sonata.media.thumbnail.format')) { |
||
| 23 | return; |
||
| 24 | } |
||
| 25 | |||
| 26 | $definition = $container->getDefinition( |
||
| 27 | 'sonata.media.thumbnail.format' |
||
| 28 | ); |
||
| 29 | |||
| 30 | $taggedServices = $container->findTaggedServiceIds( |
||
| 31 | 'sonata.media.resizer' |
||
| 32 | ); |
||
| 33 | foreach ($taggedServices as $id => $tags) { |
||
| 34 | $definition->addMethodCall( |
||
| 35 | 'addResizer', |
||
| 36 | array($id, new Reference($id)) |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | } |
||
| 41 |