@@ 11-38 (lines=28) @@ | ||
8 | * Class AddStaffRequestConfiguration |
|
9 | * @package OmnideskBundle\Configuration\Staff |
|
10 | */ |
|
11 | class AddStaffRequestConfiguration implements ConfigurationInterface |
|
12 | { |
|
13 | /** |
|
14 | * @return TreeBuilder |
|
15 | */ |
|
16 | public function getConfigTreeBuilder() |
|
17 | { |
|
18 | $treeBuilder = new TreeBuilder(); |
|
19 | ||
20 | $rootNode = $treeBuilder->root('params'); |
|
21 | ||
22 | $rootNode |
|
23 | ->children() |
|
24 | ->scalarNode('staff_email') |
|
25 | ->isRequired() |
|
26 | ->cannotBeEmpty() |
|
27 | ->end() |
|
28 | ->scalarNode('staff_full_name') |
|
29 | ->defaultNull() |
|
30 | ->end() |
|
31 | ->scalarNode('staff_signature') |
|
32 | ->defaultNull() |
|
33 | ->end() |
|
34 | ->end(); |
|
35 | ||
36 | return $treeBuilder; |
|
37 | } |
|
38 | } |
|
39 |
@@ 11-40 (lines=30) @@ | ||
8 | * Class EditStaffRequestConfiguration |
|
9 | * @package OmnideskBundle\Configuration\Staff |
|
10 | */ |
|
11 | class EditStaffRequestConfiguration implements ConfigurationInterface |
|
12 | { |
|
13 | /** |
|
14 | * @return TreeBuilder |
|
15 | */ |
|
16 | public function getConfigTreeBuilder() |
|
17 | { |
|
18 | $treeBuilder = new TreeBuilder(); |
|
19 | ||
20 | $rootNode = $treeBuilder->root('params'); |
|
21 | ||
22 | $rootNode |
|
23 | ->children() |
|
24 | ->integerNode('staff_id') |
|
25 | ->isRequired() |
|
26 | ->end() |
|
27 | ->scalarNode('staff_email') |
|
28 | ->defaultNull() |
|
29 | ->end() |
|
30 | ->scalarNode('staff_full_name') |
|
31 | ->defaultNull() |
|
32 | ->end() |
|
33 | ->scalarNode('staff_signature') |
|
34 | ->defaultNull() |
|
35 | ->end() |
|
36 | ->end(); |
|
37 | ||
38 | return $treeBuilder; |
|
39 | } |
|
40 | } |
|
41 |