mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 18:13:48 +00:00
allow empty configuration for widgets
This commit is contained in:
@@ -77,7 +77,10 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
||||
|
||||
// add the key 'widget' without the key 'enable'
|
||||
$container->setParameter('chill_main.widgets',
|
||||
array('homepage' => $config['widgets']['homepage']));
|
||||
isset($config['widgets']['homepage']) ?
|
||||
array('homepage' => $config['widgets']['homepage']):
|
||||
array()
|
||||
);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
|
@@ -68,7 +68,8 @@ class Configuration implements ConfigurationInterface
|
||||
->end() // end of children
|
||||
->end() // end of pagination
|
||||
->arrayNode('widgets')
|
||||
->canBeDisabled()
|
||||
->canBeEnabled()
|
||||
->canBeUnset()
|
||||
->children()
|
||||
->append($this->addWidgetsConfiguration('homepage', $this->containerBuilder))
|
||||
->end() // end of widgets/children
|
||||
|
Reference in New Issue
Block a user