Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 28
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 24
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 28
rs 9.536
1
<?php
2
3
namespace PiedWeb\ConversationBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    /**
11
     * php bin/console config:dump-reference PiedWebConversationBundle.
12
     */
13
    public function getConfigTreeBuilder()
14
    {
15
        $treeBuilder = new TreeBuilder('piedweb_conversation');
16
        $treeBuilder
17
            ->getRootNode()
18
                ->children()
19
                    ->scalarNode('entity_message')->defaultValue('PiedWeb\ConversationBundle\Entity\Message')->end()
20
                    ->scalarNode('notification_emailTo')->defaultNull()->end()
21
                    ->scalarNode('notification_interval')
22
                        ->defaultValue('P12H')
23
                        ->info("DateInterval's format")
24
                    ->end()
25
                    ->arrayNode('form')
26
                    ->end()
27
                    ->scalarNode('form_message')
28
                        ->defaultValue('PiedWeb\ConversationBundle\Form\MessageForm')
29
                    ->end()
30
                    ->scalarNode('form_ms-message')
31
                        ->defaultValue('PiedWeb\ConversationBundle\Form\MultiStepMessageForm')
32
                    ->end()
33
                    ->scalarNode('form_newsletter')
34
                        ->defaultValue('PiedWeb\ConversationBundle\Form\NewsletterForm')
35
                    ->end()
36
                    ->scalarNode('possible_origins')->defaultNull()->end()
37
                ->end()
38
        ;
39
40
        return $treeBuilder;
41
    }
42
}
43