-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplatingConfiguration.php
More file actions
35 lines (29 loc) · 974 Bytes
/
TemplatingConfiguration.php
File metadata and controls
35 lines (29 loc) · 974 Bytes
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
<?php
/*
* Copyright (c) Tyler Sommer
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/
namespace Nice\Extension;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class TemplatingConfiguration implements ConfigurationInterface
{
/**
* Generates the configuration tree builder.
*
* @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('templating');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
->booleanNode('enable_php_engine')->defaultFalse()->end()
->scalarNode('template_dir')->defaultValue('%app.root_dir%/views')->end()
->end();
return $treeBuilder;
}
}