mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
allow empty configuration for widgets
This commit is contained in:
parent
010c7652a6
commit
7c6d446b87
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,3 +31,4 @@ Resources/public/sass/*
|
||||
!Resources/public/sass/_timeline.scss
|
||||
!Resources/public/sass/custom/
|
||||
|
||||
/nbproject/private/
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user