Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function process(ContainerBuilder $container) |
||
29 | { |
||
30 | if (!$container->hasDefinition('bengor_file.file_bundle.twig.download_extension')) { |
||
31 | return; |
||
32 | } |
||
33 | |||
34 | $config = $container->getParameter('bengor_file.config'); |
||
35 | |||
36 | $handlers = []; |
||
37 | foreach ($config['file_class'] as $key => $file) { |
||
38 | $handlers[$key] = $container->getDefinition('bengor.file.application.query.' . $key . '_of_id'); |
||
39 | } |
||
40 | |||
41 | $container->getDefinition('bengor_file.file_bundle.twig.download_extension')->replaceArgument( |
||
42 | 1, |
||
43 | $handlers |
||
44 | ); |
||
45 | } |
||
46 | } |
||
47 |