-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathConfiguration.php
41 lines (36 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
/**
* SimpleThings FormSerializerBundle
*
* LICENSE
*
* This source file is subject to the MIT license that is bundled
* with this package in the file LICENSE.txt.
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so I can send you a copy immediately.
*/
namespace SimpleThings\FormSerializerBundle\DependencyInjection;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$builder = new TreeBuilder();
return $builder->root('simple_things_form_serializer')
->children()
->booleanNode('include_root_in_json')->defaultFalse()->end()
->scalarNode('application_xml_root_name')->defaultNull()->end()
->scalarNode('naming_strategy')->defaultValue('camel_case')->end()
->arrayNode('encoders')
->addDefaultsIfNotSet()
->children()
->booleanNode('xml')->defaultTrue()->end()
->booleanNode('json')->defaultTrue()->end()
->end()
->end()
->end()
->end();
}
}