Configuration.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection;
  11. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  12. use Symfony\Component\Config\Definition\ConfigurationInterface;
  13. /**
  14. * This class contains the configuration information for the bundle.
  15. *
  16. * This information is solely responsible for how the different configuration
  17. * sections are normalized, and merged.
  18. *
  19. * @author Fabien Potencier <fabien@symfony.com>
  20. */
  21. class Configuration implements ConfigurationInterface
  22. {
  23. /**
  24. * Generates the configuration tree builder.
  25. *
  26. * @return TreeBuilder The tree builder
  27. */
  28. public function getConfigTreeBuilder()
  29. {
  30. $treeBuilder = new TreeBuilder('web_profiler');
  31. $treeBuilder->getRootNode()
  32. ->children()
  33. ->booleanNode('toolbar')->defaultFalse()->end()
  34. ->booleanNode('intercept_redirects')->defaultFalse()->end()
  35. ->scalarNode('excluded_ajax_paths')->defaultValue('^/((index|app(_[\w]+)?)\.php/)?_wdt')->end()
  36. ->end()
  37. ;
  38. return $treeBuilder;
  39. }
  40. }