public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer)
{
if (!empty($scopeSettings['fieldtypes'])) {
// Workaround to be able to use Contextualizer::mapConfigArray() which only supports first level entries.
if (isset($scopeSettings['fieldtypes']['ezrichtext']['output_custom_tags'])) {
$scopeSettings['fieldtypes.ezrichtext.output_custom_xsl'] = $scopeSettings['fieldtypes']['ezrichtext']['output_custom_tags'];
unset($scopeSettings['fieldtypes']['ezrichtext']['output_custom_tags']);
}
if (isset($scopeSettings['fieldtypes']['ezrichtext']['edit_custom_tags'])) {
$scopeSettings['fieldtypes.ezrichtext.edit_custom_xsl'] = $scopeSettings['fieldtypes']['ezrichtext']['edit_custom_tags'];
unset($scopeSettings['fieldtypes']['ezrichtext']['edit_custom_tags']);
}
if (isset($scopeSettings['fieldtypes']['ezrichtext']['input_custom_tags'])) {
$scopeSettings['fieldtypes.ezrichtext.input_custom_xsl'] = $scopeSettings['fieldtypes']['ezrichtext']['input_custom_tags'];
unset($scopeSettings['fieldtypes']['ezrichtext']['input_custom_tags']);
}
if (isset($scopeSettings['fieldtypes']['ezrichtext']['tags'])) {
foreach ($scopeSettings['fieldtypes']['ezrichtext']['tags'] as $name => $tagSettings) {
$contextualizer->setContextualParameter("fieldtypes.ezrichtext.tags.{$name}", $currentScope, $scopeSettings['fieldtypes']['ezrichtext']['tags'][$name]);
}
}
if (isset($scopeSettings['fieldtypes']['ezrichtext']['embed'])) {
foreach ($scopeSettings['fieldtypes']['ezrichtext']['embed'] as $type => $embedSettings) {
$contextualizer->setContextualParameter("fieldtypes.ezrichtext.embed.{$type}", $currentScope, $scopeSettings['fieldtypes']['ezrichtext']['embed'][$type]);
}
}
}
}