forked from lolautruche/EzCoreExtraBundle
/
Configuration.php
40 lines (34 loc) · 1.35 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
<?php
/*
* This file is part of the EzCoreExtraBundle package.
*
* (c) Jérôme Vieilledent <jerome@vieilledent.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Lolautruche\EzCoreExtraBundle\DependencyInjection;
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
class Configuration extends SiteAccessConfiguration
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ez_core_extra');
$systemNode = $this->generateScopeBaseNode($rootNode);
$systemNode
->arrayNode('twig_globals')
->info('Variables available in all Twig templates for current SiteAccess.')
->normalizeKeys(false)
->useAttributeAsKey('variable_name')
->example(array('foo' => '"bar"', 'pi' => 3.14))
->prototype('variable')->end()
->end()
->booleanNode('enable_email_authentication')
->info('Whether eZ users can authenticate against their e-mail or not.')
->defaultFalse()
->end();
return $treeBuilder;
}
}