From dda57bb9443817e3a080d5d25343f5a7e15dd14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 26 Oct 2015 14:38:24 +0100 Subject: fix #1502 avoid duplicate entry and store pocket url in config --- .../ImportBundle/DependencyInjection/Configuration.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/Wallabag/ImportBundle/DependencyInjection/Configuration.php') 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 @@ namespace Wallabag\ImportBundle\DependencyInjection; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; @@ -12,6 +13,22 @@ class Configuration implements ConfigurationInterface $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('wallabag_import'); + $rootNode + ->children() + ->arrayNode('importers') + ->append($this->getURLs()) + ->end() + ->end() + ; + return $treeBuilder; } + + private function getURLs() + { + $node = new ArrayNodeDefinition('pocket_urls'); + $node->prototype('scalar')->end(); + + return $node; + } } -- cgit v1.2.3