eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\FieldType\RichText::mapConfig PHP Метод

mapConfig() публичный Метод

public mapConfig ( array &$scopeSettings, $currentScope, eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface $contextualizer )
$scopeSettings array
$contextualizer eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface
    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]);
                }
            }
        }
    }