/
Configuration.php
64 lines (58 loc) · 1.89 KB
/
Configuration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
* This file is part of the Ekino Wordpress package.
*
* (c) 2013 Ekino
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ekino\WordpressBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* Configuration
*
* This class generates configuration settings tree
*
* @author Vincent Composieux <composieux@ekino.com>
*/
class Configuration implements ConfigurationInterface
{
/**
* Builds configuration tree
*
* @return \Symfony\Component\Config\Definition\Builder\TreeBuilder A tree builder instance
*/
public function getConfigTreeBuilder()
{
/**
->arrayNode('profiler')
->addDefaultsIfNotSet()
->fixXmlConfig('container_type', 'container_types')
->children()
->scalarNode('enabled')->defaultValue('%kernel.debug%')->end()
->end()
->end()
*/
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ekino_wordpress');
$rootNode
->children()
->scalarNode('table_prefix')->end()
->scalarNode('wordpress_directory')->end()
->scalarNode('entity_manager')->end()
->booleanNode('load_twig_extension')->defaultFalse()->end()
->booleanNode('cookie_hash')->defaultNull()->end()
->scalarNode('i18n_cookie_name')->defaultFalse()->end()
->arrayNode('security')
->addDefaultsIfNotSet()
->children()
->scalarNode('firewall_name')->defaultValue('secured_area')->end()
->end()
->end()
->end()
;
return $treeBuilder;
}
}