. */ namespace vierbergenlars\AuthserverTosBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files. * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html} */ class Configuration implements ConfigurationInterface { /** * * {@inheritdoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('tos'); // @formatter:off $rootNode ->children() ->arrayNode('terms') ->prototype('array') ->children() ->scalarNode('label')->defaultNull()->info('Label for how the terms are named (terms of service, privacy policy, ...)')->end() ->scalarNode('url')->defaultNull()->info('Link to the terms of service')->end() ->end() ->end() ->end() ->integerNode('version')->defaultValue(0)->info('Version of the terms of service')->end() ->end(); // @formatter:on return $treeBuilder; } }