Completed
Pull Request — master (#4433)
by Craig
10:17 queued 04:54
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 11
rs 10
c 1
b 0
f 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Zikula package.
7
 *
8
 * Copyright Zikula - https://ziku.la/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zikula\Bundle\CoreBundle\DependencyInjection;
15
16
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
17
use Symfony\Component\Config\Definition\ConfigurationInterface;
18
19
class Configuration implements ConfigurationInterface
20
{
21
    public const DEFAULT_DATADIR = 'public/uploads';
22
23
    public function getConfigTreeBuilder()
24
    {
25
        $treeBuilder = new TreeBuilder('core');
26
27
        $treeBuilder->getRootNode()
28
            ->children()
29
                ->scalarNode('datadir')->defaultValue(self::DEFAULT_DATADIR)->end()
30
            ->end()
31
        ;
32
33
        return $treeBuilder;
34
    }
35
}
36