private function addFormatSection(ArrayNodeDefinition $rootNode, string $key, array $defaultValue)
{
$rootNode->children()->arrayNode($key)->defaultValue($defaultValue)->info('The list of enabled formats. The first one will be the default.')->normalizeKeys(false)->useAttributeAsKey('format')->beforeNormalization()->ifArray()->then(function ($v) {
foreach ($v as $format => $value) {
if (isset($value['mime_types'])) {
continue;
}
$v[$format] = ['mime_types' => $value];
}
return $v;
})->end()->prototype('array')->children()->arrayNode('mime_types')->prototype('scalar')->end()->end()->end()->end()->end()->end();
}