-
Notifications
You must be signed in to change notification settings - Fork 4
/
Configuration.php
152 lines (147 loc) · 7.66 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php declare(strict_types=1);
/*
* This file is part of the package t3g/symfony-template-bundle.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
namespace T3G\Bundle\TemplateBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('template');
$treeBuilder->getRootNode()
->children()
->arrayNode('application')->addDefaultsIfNotSet()
->children()
->scalarNode('name')
->defaultValue('Template Bundle')
->example('Intercept')
->cannotBeEmpty()
->end()
->scalarNode('platformkey')
->example('intercept')
->defaultValue(false)
->end()
->arrayNode('copyright')->addDefaultsIfNotSet()
->children()
->scalarNode('author')
->defaultValue('TYPO3 GmbH')
->example('TYPO3 GmbH')
->cannotBeEmpty()
->end()
->scalarNode('url')
->defaultValue('https://typo3.com')
->example('https://typo3.com')
->cannotBeEmpty()
->end()
->end()
->end()
->arrayNode('email')->addDefaultsIfNotSet()
->children()
->scalarNode('legal_footer')
->defaultValue(implode("\n", [
'TYPO3 GmbH, Emanuel-Leutze-Straße 11, DE-40547 Düsseldorf, Germany',
'Phone: +49 (0)211 20 54 36 0, Web: www.typo3.com, Email: info@typo3.com',
'',
'Court of registration: Amtsgericht Düsseldorf HRB 77950',
'CEO: Daniel Fau, (CTO & Procuration) Frank Nägler',
'Supervisory Board: Olivier Dobberkau, Ric van Westhreenen, Stefan Busemann'
]))
->example(implode("\n", [
'TYPO3 GmbH, Emanuel-Leutze-Straße 11, DE-40547 Düsseldorf, Germany',
'Phone: +49 (0)211 20 54 36 0, Web: www.typo3.com, Email: info@typo3.com',
'',
'Court of registration: Amtsgericht Düsseldorf HRB 77950',
'CEO: Daniel Fau, (CTO & Procuration) Frank Nägler',
'Supervisory Board: Olivier Dobberkau, Ric van Westhreenen, Stefan Busemann'
]))
->cannotBeEmpty()
->end()
->end()
->end()
->arrayNode('routes')->addDefaultsIfNotSet()
->children()
->scalarNode('home')
->defaultValue('app_index')
->example('app_index')
->cannotBeEmpty()
->end()
->scalarNode('privacy')
->defaultValue('https://typo3.com/privacy-policy')
->example('https://typo3.com/privacy-policy')
->end()
->scalarNode('legal')
->defaultValue('https://typo3.com/legal-notice')
->example('https://typo3.com/legal-notice')
->end()
->scalarNode('feedback')
->defaultValue('https://support.typo3.com')
->example('https://support.typo3.com')
->end()
->end()
->end()
->arrayNode('menu')->addDefaultsIfNotSet()
->children()
->scalarNode('class')
->defaultValue('T3G\Bundle\TemplateBundle\Menu\MenuBuilder')
->example('App\Menu\MenuBuilder')
->cannotBeEmpty()
->end()
->end()
->end()
->arrayNode('assets')->addDefaultsIfNotSet()
->children()
->scalarNode('encore_entrypoint')
->defaultValue(false)
->example('app')
->end()
->end()
->end()
->arrayNode('theme')->addDefaultsIfNotSet()
->children()
->booleanNode('use_logo')
->defaultValue(false)
->end()
->scalarNode('navbar_breakpoint')
->defaultValue('lg')
->example('md')
->cannotBeEmpty()
->end()
->scalarNode('background')
->defaultValue('lighter')
->example('none')
->end()
->end()
->end()
->arrayNode('security')->addDefaultsIfNotSet()
->children()
->arrayNode('headers')
->useAttributeAsKey('name')
->normalizeKeys(false)
->scalarPrototype()->end()
->end()
->arrayNode('content_security_policy')->addDefaultsIfNotSet()
->children()
->booleanNode('report_only')
->defaultValue(true)
->end()
->arrayNode('rules')
->useAttributeAsKey('name')
->normalizeKeys(false)
->scalarPrototype()->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
;
return $treeBuilder;
}
}