vendor/knplabs/knp-menu-bundle/src/DependencyInjection/Configuration.php line 22

Open in your IDE?
  1. <?php
  2. namespace Knp\Bundle\MenuBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  4. use Symfony\Component\Config\Definition\ConfigurationInterface;
  5. /**
  6.  * This class contains the configuration information for the bundle
  7.  *
  8.  * @author Christophe Coevoet <stof@notk.org>
  9.  */
  10. class Configuration implements ConfigurationInterface
  11. {
  12.     /**
  13.      * Generates the configuration tree.
  14.      *
  15.      * @return TreeBuilder
  16.      */
  17.     public function getConfigTreeBuilder()
  18.     {
  19.         $treeBuilder = new TreeBuilder();
  20.         $rootNode $treeBuilder->root('knp_menu');
  21.         $rootNode
  22.             ->children()
  23.                 ->arrayNode('providers')
  24.                     ->addDefaultsIfNotSet()
  25.                     ->children()
  26.                         ->booleanNode('builder_alias')->defaultTrue()->end()
  27.                         ->booleanNode('container_aware')->defaultTrue()->end()
  28.                         ->booleanNode('builder_service')->defaultTrue()->end()
  29.                     ->end()
  30.                 ->end()
  31.                 ->arrayNode('twig')
  32.                     ->addDefaultsIfNotSet()
  33.                     ->canBeUnset()
  34.                     ->children()
  35.                         ->scalarNode('template')->defaultValue('@KnpMenu/menu.html.twig')->end()
  36.                     ->end()
  37.                 ->end()
  38.                 ->booleanNode('templating')->defaultFalse()->end()
  39.                 ->scalarNode('default_renderer')->cannotBeEmpty()->defaultValue('twig')->end()
  40.             ->end();
  41.         return $treeBuilder;
  42.     }
  43. }