forked from wallabag/wallabag
fix #1502 avoid duplicate entry and store pocket url in config
This commit is contained in:
committed by
Jeremy Benoist
parent
87f23b005c
commit
dda57bb944
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user