Completed
Push — master ( a18731...e2e070 )
by
unknown
99:54 queued 47:45
created

Configuration::getConfigTreeBuilder()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 31
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 31
rs 8.8571
c 1
b 0
f 0
cc 1
eloc 17
nc 1
nop 0
1
<?php
2
3
namespace OroCRM\Bundle\SalesBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
use Oro\Bundle\ConfigBundle\DependencyInjection\SettingsBuilder;
9
10
class Configuration implements ConfigurationInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function getConfigTreeBuilder()
16
    {
17
        $treeBuilder = new TreeBuilder();
18
        $rootNode = $treeBuilder->root('oro_crm_sales');
19
20
        // Here you should define the parameters that are allowed to
21
        // configure your bundle. See the documentation linked above for
22
        // more information on that topic.
23
24
        $defaults = [
25
            'in_progress'               => 0,
26
            'identification_alignment'  => 0.1,
27
            'needs_analysis'            => 0.2,
28
            'solution_development'      => 0.5,
29
            'negotiation'               => 0.8,
30
            'won'                       => 1,
31
            'lost'                      => 0,
32
        ];
33
34
        SettingsBuilder::append(
35
            $rootNode,
36
            [
37
                'default_opportunity_probabilities' => [
38
                    'value' => $defaults,
39
                    'type' => 'array',
40
                ],
41
            ]
42
        );
43
44
        return $treeBuilder;
45
    }
46
}
47