| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 18 | protected function loadInternal(array $config, ContainerBuilder $container) |
|
| 29 | { |
||
| 30 | 18 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 31 | |||
| 32 | 18 | foreach (['form'] as $resource) { |
|
| 33 | 18 | $loader->load($resource.'.xml'); |
|
| 34 | 14 | } |
|
| 35 | |||
| 36 | $container |
||
| 37 | 18 | ->getDefinition($formExtension = 'ivory.base64_file.form.extension') |
|
| 38 | 18 | ->addArgument($config['default']); |
|
| 39 | |||
| 40 | 18 | if (!method_exists(AbstractType::class, 'getBlockPrefix')) { |
|
| 41 | $container |
||
| 42 | 8 | ->getDefinition($formExtension) |
|
| 43 | 8 | ->clearTag('form.type_extension') |
|
| 44 | 8 | ->addTag('form.type_extension', ['alias' => 'file']); |
|
| 45 | 4 | } |
|
| 46 | 18 | } |
|
| 47 | } |
||
| 48 |