public function mapConfig(array $enabledCustomStyles)
    {
        $config = [];
        foreach ($enabledCustomStyles as $styleName) {
            if (!isset($this->customStylesConfiguration[$styleName])) {
                throw new RuntimeException(
                    "RichText Custom Style configuration for {$styleName} not found."
                );
            }

            $customStyleConfiguration = $this->customStylesConfiguration[$styleName];
            $config[$styleName]['inline'] = $customStyleConfiguration['inline'];
            $config[$styleName]['label'] = $this->translator->trans(
                /** @Ignore */
                sprintf('ezrichtext.custom_styles.%s.label', $styleName),
                [],
                $this->translationDomain
            );
        }

        return $config;
    }
public function mapConfig(array $enabledCustomStyles)
    {
        $config = [];
        foreach ($enabledCustomStyles as $styleName) {
            if (!isset($this->customStylesConfiguration[$styleName])) {
                throw new RuntimeException(
                    "RichText Custom Style configuration for {$styleName} not found."
                );
            }

            $customStyleConfiguration = $this->customStylesConfiguration[$styleName];
            $config[$styleName]['inline'] = $customStyleConfiguration['inline'];
            $config[$styleName]['label'] = $this->translator->trans(
                /** @Ignore */
                sprintf('ezrichtext.custom_styles.%s.label', $styleName),
                [],
                $this->translationDomain
            );
        }

        return $config;
    }
public function mapConfig ( array $ enabledCustomStyles ) { $ config = [ ] ; foreach ( $ enabledCustomStyles as $ styleName ) { if ( ! isset ( $ this -> customStylesConfiguration [ $ styleName ] ) ) { throw new RuntimeException ( "RichText Custom Style configuration for {$styleName} not found." ) ; } $ customStyleConfiguration = $ this -> customStylesConfiguration [ $ styleName ] ; $ config [ $ styleName ] [ 'inline' ] = $ customStyleConfiguration [ 'inline' ] ; $ config [ $ styleName ] [ 'label' ] = $ this -> translator -> trans ( /** @Ignore */ sprintf ( 'ezrichtext.custom_styles.%s.label' , $ styleName ) , [ ] , $ this -> translationDomain ) ; } return $ config ; }
Map Configuration for the given list of enabled Custom Styles.

@param array $enabledCustomStyles

@return array Mapped configuration
Map Configuration for the given list of enabled Custom Styles .