]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/DependencyInjection/Configuration.php
form to upload file
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / DependencyInjection / Configuration.php
CommitLineData
c89d35e8
NL
1<?php
2
3namespace Wallabag\CoreBundle\DependencyInjection;
4
5use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6use Symfony\Component\Config\Definition\ConfigurationInterface;
d275bdf4 7use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
c89d35e8
NL
8
9class Configuration implements ConfigurationInterface
10{
11 public function getConfigTreeBuilder()
12 {
13 $treeBuilder = new TreeBuilder();
14 $rootNode = $treeBuilder->root('wallabag_core');
15
16 $rootNode
17 ->children()
18 ->arrayNode('languages')
19 ->prototype('scalar')->end()
20 ->end()
d275bdf4
NL
21 ->arrayNode('import')
22 ->append($this->getAllowMimetypes())
23 ->end()
c89d35e8
NL
24 ->end()
25 ;
26
27 return $treeBuilder;
28 }
d275bdf4
NL
29
30 private function getAllowMimetypes()
31 {
32 $node = new ArrayNodeDefinition('allow_mimetypes');
33
34 $node->prototype('scalar')->end();
35
36 return $node;
37 }
c89d35e8 38}