1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace AtlassianConnectBundle\DependencyInjection; |
6
|
|
|
|
7
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
8
|
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface; |
9
|
|
|
|
10
|
|
|
class Configuration implements ConfigurationInterface |
11
|
|
|
{ |
12
|
|
|
public function getConfigTreeBuilder(): TreeBuilder |
13
|
|
|
{ |
14
|
|
|
$treeBuilder = new TreeBuilder('atlassian_connect'); |
15
|
|
|
$rootNode = $treeBuilder->getRootNode(); |
16
|
|
|
|
17
|
|
|
$rootNode |
18
|
|
|
->children() |
19
|
|
|
->variableNode('dev_tenant')->defaultValue(1)->end() |
20
|
|
|
->arrayNode('descriptor') |
21
|
|
|
->ignoreExtraKeys() |
22
|
|
|
->children() |
23
|
|
|
->arrayNode('authentication') |
24
|
|
|
->addDefaultsIfNotSet() |
25
|
|
|
->children() |
26
|
|
|
->enumNode('type')->values(['jwt', 'none', 'JWT', 'NONE'])->defaultValue('jwt')->isRequired()->end() |
27
|
|
|
->end() |
28
|
|
|
->end() |
29
|
|
|
->scalarNode('baseUrl')->isRequired()->cannotBeEmpty()->end() |
30
|
|
|
->variableNode('regionBaseUrls')->end() |
31
|
|
|
->scalarNode('key')->isRequired()->cannotBeEmpty()->end() |
32
|
|
|
->integerNode('apiVersion')->end() |
33
|
|
|
->scalarNode('name')->end() |
34
|
|
|
->scalarNode('description')->end() |
35
|
|
|
->scalarNode('aliasKey')->end() |
36
|
|
|
->booleanNode('enableLicensing')->end() |
37
|
|
|
->arrayNode('lifecycle') |
38
|
|
|
->children() |
39
|
|
|
->scalarNode('installed')->end() |
40
|
|
|
->scalarNode('enabled')->end() |
41
|
|
|
->scalarNode('disabled')->end() |
42
|
|
|
->scalarNode('uninstalled')->end() |
43
|
|
|
->end() |
44
|
|
|
->end() |
45
|
|
|
->arrayNode('vendor') |
46
|
|
|
->children() |
47
|
|
|
->scalarNode('name')->end() |
48
|
|
|
->scalarNode('url')->end() |
49
|
|
|
->end() |
50
|
|
|
->end() |
51
|
|
|
->arrayNode('scopes') |
52
|
|
|
->scalarPrototype()->end() |
53
|
|
|
->end() |
54
|
|
|
->variableNode('links')->end() |
55
|
|
|
->variableNode('modules')->end() |
56
|
|
|
->variableNode('apiMigrations')->end() |
57
|
|
|
->arrayNode('translations') |
58
|
|
|
->children() |
59
|
|
|
->arrayNode('paths') |
60
|
|
|
->scalarPrototype()->end() |
61
|
|
|
->end() |
62
|
|
|
->end() |
63
|
|
|
->end() |
64
|
|
|
->end() |
65
|
|
|
->end() |
66
|
|
|
->arrayNode('license_allow_list') |
67
|
|
|
->arrayPrototype() |
68
|
|
|
->children() |
69
|
|
|
->scalarNode('client_key')->end() |
70
|
|
|
->scalarNode('valid_till')->end() |
71
|
|
|
->end() |
72
|
|
|
->end() |
73
|
|
|
->end() |
74
|
|
|
->end() |
75
|
|
|
; |
76
|
|
|
|
77
|
|
|
return $treeBuilder; |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|