/
Configuration.php
48 lines (40 loc) · 1.18 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
41
42
43
44
45
46
47
48
<?php
declare(strict_types=1);
/*
* This file is a part of Sculpin.
*
* (c) Dragonfly Development Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sculpin\Bundle\MarkdownBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* Configuration.
*
* @author Beau Simensen <beau@dflydev.com>
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder;
$rootNode = $treeBuilder->root('sculpin_markdown');
$rootNode
->children()
->scalarNode('parser_class')
->defaultValue('Sculpin\Bundle\MarkdownBundle\PhpMarkdownExtraParser')
->end()
->arrayNode('extensions')
->defaultValue(['md', 'mdown', 'mkdn', 'markdown'])
->prototype('scalar')->end()
->end()
->end();
return $treeBuilder;
}
}