KnpMarkdownBundle/DependencyInjection/Configuration.php

33 lines
798 B
PHP
Raw Normal View History

<?php
namespace Knp\Bundle\MarkdownBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
class Configuration
{
/**
* Generates the configuration tree.
*
2012-05-03 10:49:31 +02:00
* @return TreeBuilder
*/
public function getConfigTree()
{
$treeBuilder = new TreeBuilder();
$treeBuilder->root('knp_markdown', 'array')
->addDefaultsIfNotSet()
->children()
->arrayNode('parser')
->addDefaultsIfNotSet()
->children()
->scalarNode('service')->cannotBeEmpty()->defaultValue('markdown.parser.max')->end()
->end()
->end()
->end()
->end();
return $treeBuilder->buildTree();
}
}