Configuration::getConfigTreeBuilder()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 34
Code Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 34
cc 1
eloc 22
nc 1
nop 0
rs 8.8571
1
<?php
2
3
namespace DoS\TaggingBundle\DependencyInjection;
4
5
use DoS\CernelBundle\Config\AbstractConfiguration;
6
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
7
8
class Configuration extends AbstractConfiguration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function getConfigTreeBuilder()
14
    {
15
        $treeBuilder = new TreeBuilder();
16
        $rootNode = $treeBuilder->root('dos_tagging');
17
18
        $this->setDefaults($rootNode, array(
19
            'resources' => array(
20
                'tag' => array(
21
                    'classes' => array(
22
                        'model' => 'DoS\TaggingBundle\Model\Tag',
23
                        'interface' => 'DoS\TaggingBundle\Model\TagInterface',
24
                        'repository' => 'DoS\TaggingBundle\Doctrine\ORM\TagRepository',
25
                        'controller' => 'DoS\TaggingBundle\Controller\TagController',
26
                    ),
27
                    'validation_groups' => array(
28
                        'default' => array('dos'),
29
                    ),
30
                ),
31
                'tagging' => array(
32
                    'classes' => array(
33
                        'model' => 'DoS\TaggingBundle\Model\Tagging',
34
                        'interface' => 'DoS\TaggingBundle\Model\TaggingInterface',
35
                        'repository' => 'DoS\TaggingBundle\Doctrine\ORM\TaggingRepository',
36
                        'controller' => 'DoS\TaggingBundle\Controller\TaggingController',
37
                    ),
38
                    'validation_groups' => array(
39
                        'default' => array('dos'),
40
                    ),
41
                ),
42
            ),
43
        ));
44
45
        return $treeBuilder;
46
    }
47
}
48