diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@smile.fr> | 2015-10-26 14:38:24 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-02 23:24:17 +0100 |
commit | dda57bb9443817e3a080d5d25343f5a7e15dd14f (patch) | |
tree | 75a2447f84aad68ff6a1efe01019b77a2148d339 /src/Wallabag/ImportBundle/DependencyInjection/Configuration.php | |
parent | 87f23b005c5f68f7463333a74317efa4eb9a9565 (diff) | |
download | wallabag-dda57bb9443817e3a080d5d25343f5a7e15dd14f.tar.gz wallabag-dda57bb9443817e3a080d5d25343f5a7e15dd14f.tar.zst wallabag-dda57bb9443817e3a080d5d25343f5a7e15dd14f.zip |
fix #1502 avoid duplicate entry and store pocket url in config
Diffstat (limited to 'src/Wallabag/ImportBundle/DependencyInjection/Configuration.php')
-rw-r--r-- | src/Wallabag/ImportBundle/DependencyInjection/Configuration.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php index bacaff31..3c14104e 100644 --- a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\DependencyInjection; | 3 | namespace Wallabag\ImportBundle\DependencyInjection; |
4 | 4 | ||
5 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; | ||
5 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; | 6 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
6 | use Symfony\Component\Config\Definition\ConfigurationInterface; | 7 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
7 | 8 | ||
@@ -12,6 +13,22 @@ class Configuration implements ConfigurationInterface | |||
12 | $treeBuilder = new TreeBuilder(); | 13 | $treeBuilder = new TreeBuilder(); |
13 | $rootNode = $treeBuilder->root('wallabag_import'); | 14 | $rootNode = $treeBuilder->root('wallabag_import'); |
14 | 15 | ||
16 | $rootNode | ||
17 | ->children() | ||
18 | ->arrayNode('importers') | ||
19 | ->append($this->getURLs()) | ||
20 | ->end() | ||
21 | ->end() | ||
22 | ; | ||
23 | |||
15 | return $treeBuilder; | 24 | return $treeBuilder; |
16 | } | 25 | } |
26 | |||
27 | private function getURLs() | ||
28 | { | ||
29 | $node = new ArrayNodeDefinition('pocket_urls'); | ||
30 | $node->prototype('scalar')->end(); | ||
31 | |||
32 | return $node; | ||
33 | } | ||
17 | } | 34 | } |