diff --git a/Bundle/CoreBundle/src/Ckeditor/CkeditorConfiguration.php b/Bundle/CoreBundle/src/Ckeditor/CkeditorConfiguration.php index 7b1b5db..b16b57c 100644 --- a/Bundle/CoreBundle/src/Ckeditor/CkeditorConfiguration.php +++ b/Bundle/CoreBundle/src/Ckeditor/CkeditorConfiguration.php @@ -58,6 +58,10 @@ private function resolveConfig(array $bundleConfig) $this->configs['full'] = self::FULL_CONFIG; foreach ($bundleConfig['configs'] as $configName => $config) { + if (!is_array($config)) { + throw new \RuntimeException(sprintf('[Ckeditor] Invalid "umbrella_core.configs.%s" config. Ckeditor config must be an array of options. ', $configName)); + } + $this->configs[$configName] = $config; } diff --git a/Bundle/CoreBundle/src/DependencyInjection/Configuration.php b/Bundle/CoreBundle/src/DependencyInjection/Configuration.php index b3e2305..74d029b 100644 --- a/Bundle/CoreBundle/src/DependencyInjection/Configuration.php +++ b/Bundle/CoreBundle/src/DependencyInjection/Configuration.php @@ -63,15 +63,14 @@ private function ckeditorSection(ArrayNodeDefinition $rootNode) ->end() ->scalarNode('default_config') ->defaultValue('full') - ->info('Default config to use on CkeditorType (if none specified).') + ->info('Default config to use on CkeditorType (if none specified on CkeditorType).') ->end() ->arrayNode('configs') ->info('List of configs for CkeditorType @see Umbrella\CoreBundle\Ckeditor\CkeditorConfiguration for example.') ->example(['my_custom_config' => CkeditorConfiguration::EXAMPLE_CONFIG]) - ->normalizeKeys(false) ->useAttributeAsKey('name') - ->arrayPrototype() - ->scalarPrototype()->end() + ->normalizeKeys(false) + ->variablePrototype() ->end(); }