-
Notifications
You must be signed in to change notification settings - Fork 1
/
Configuration.php
44 lines (36 loc) · 1.1 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
<?php
/*
* Copyright (c) 2021 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
namespace HeimrichHannot\HyphenatorBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
const ROOT_ID = 'huh_hyphenator';
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder(static::ROOT_ID);
// Keep compatibility with symfony/config < 4.2
if (!method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root(static::ROOT_ID);
} else {
$rootNode = $treeBuilder->getRootNode();
}
// $rootNode = $treeBuilder->root(static::ROOT_ID);
$rootNode
->children()
->arrayNode('skip_tags')
->scalarPrototype()
->defaultValue(['script'])
->end()
->end()
->end();
return $treeBuilder;
}
}