Conditions | 1 |
Paths | 1 |
Total Lines | 32 |
Code Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function getConfigTreeBuilder(): NodeParentInterface |
||
14 | { |
||
15 | $treeBuilder = new TreeBuilder('roukmoute_hashids'); |
||
16 | $rootNode = $treeBuilder->getRootNode(); |
||
17 | |||
18 | $rootNode |
||
19 | ->children() |
||
20 | ->scalarNode('salt') |
||
21 | ->defaultValue('') |
||
22 | ->info('if set, the hashids will differ from everyone else\'s.') |
||
23 | ->end() |
||
24 | ->integerNode('min_hash_length') |
||
25 | ->info('if set, will generate minimum length for the id.') |
||
26 | ->defaultValue(0) |
||
27 | ->min(0) |
||
28 | ->end() |
||
29 | ->scalarNode('alphabet') |
||
30 | ->info('if set, will use only characters of alphabet string.') |
||
31 | ->defaultValue('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890') |
||
32 | ->end() |
||
33 | ->booleanNode('passthrough') |
||
34 | ->info('if true, will continue with others param converters.') |
||
35 | ->defaultFalse() |
||
36 | ->end() |
||
37 | ->booleanNode('auto_convert') |
||
38 | ->info('if true, try to convert all arguments in controller. Except use "_hash_" in specific routing variables.') |
||
39 | ->defaultFalse() |
||
40 | ->end() |
||
41 | ->end() |
||
42 | ; |
||
43 | |||
44 | return $treeBuilder; |
||
45 | } |
||
47 |