mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-05-21 14:56:31 +02:00
35 lines
944 B
PHP
35 lines
944 B
PHP
<?php
|
|
|
|
namespace Knp\Bundle\MarkdownBundle\DependencyInjection;
|
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|
|
|
class Configuration implements ConfigurationInterface
|
|
{
|
|
/**
|
|
* Generates the configuration tree builder.
|
|
*
|
|
* @return TreeBuilder
|
|
*/
|
|
public function getConfigTreeBuilder(): TreeBuilder
|
|
{
|
|
$treeBuilder = new TreeBuilder('knp_markdown');
|
|
$rootNode = $treeBuilder->getRootNode();
|
|
|
|
$rootNode
|
|
->addDefaultsIfNotSet()
|
|
->children()
|
|
->arrayNode('parser')
|
|
->addDefaultsIfNotSet()
|
|
->children()
|
|
->scalarNode('service')->cannotBeEmpty()->defaultValue('markdown.parser.max')->end()
|
|
->end()
|
|
->end()
|
|
->end()
|
|
->end();
|
|
|
|
return $treeBuilder;
|
|
}
|
|
}
|