diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-20 19:54:57 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-31 14:37:19 +0100 |
commit | bc78968764c741019a6b866ad434678cdbecbba4 (patch) | |
tree | 2b0ef3a4dcb51f09c7865a13b797221fadb445ae /src/Wallabag/CoreBundle/DependencyInjection | |
parent | feb02cb709b7f72330fabcac2f81d0fabdbf1a9b (diff) | |
download | wallabag-bc78968764c741019a6b866ad434678cdbecbba4.tar.gz wallabag-bc78968764c741019a6b866ad434678cdbecbba4.tar.zst wallabag-bc78968764c741019a6b866ad434678cdbecbba4.zip |
Move default configuration out of parameters
These default configuration value shouldn't be in parameters.yml.
Diffstat (limited to 'src/Wallabag/CoreBundle/DependencyInjection')
-rw-r--r-- | src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | 12 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index 32acd1f1..4d5a63f8 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | |||
@@ -17,6 +17,18 @@ class Configuration implements ConfigurationInterface | |||
17 | ->arrayNode('languages') | 17 | ->arrayNode('languages') |
18 | ->prototype('scalar')->end() | 18 | ->prototype('scalar')->end() |
19 | ->end() | 19 | ->end() |
20 | ->integerNode('items_on_page') | ||
21 | ->defaultValue(12) | ||
22 | ->end() | ||
23 | ->scalarNode('theme') | ||
24 | ->defaultValue('material') | ||
25 | ->end() | ||
26 | ->scalarNode('language') | ||
27 | ->defaultValue('en') | ||
28 | ->end() | ||
29 | ->integerNode('rss_limit') | ||
30 | ->defaultValue(50) | ||
31 | ->end() | ||
20 | ->end() | 32 | ->end() |
21 | ; | 33 | ; |
22 | 34 | ||
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 9ff9b732..73bbffe1 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php | |||
@@ -13,7 +13,12 @@ class WallabagCoreExtension extends Extension | |||
13 | { | 13 | { |
14 | $configuration = new Configuration(); | 14 | $configuration = new Configuration(); |
15 | $config = $this->processConfiguration($configuration, $configs); | 15 | $config = $this->processConfiguration($configuration, $configs); |
16 | |||
16 | $container->setParameter('wallabag_core.languages', $config['languages']); | 17 | $container->setParameter('wallabag_core.languages', $config['languages']); |
18 | $container->setParameter('wallabag_core.items_on_page', $config['items_on_page']); | ||
19 | $container->setParameter('wallabag_core.theme', $config['theme']); | ||
20 | $container->setParameter('wallabag_core.language', $config['language']); | ||
21 | $container->setParameter('wallabag_core.rss_limit', $config['rss_limit']); | ||
17 | 22 | ||
18 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | 23 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
19 | $loader->load('services.yml'); | 24 | $loader->load('services.yml'); |