Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

vendor/twig/extra-bundle/DependencyInjection/Configuration.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Twig.
  4.  *
  5.  * (c) Fabien Potencier
  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 Twig\Extra\TwigExtraBundle\DependencyInjection;
  11. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  12. use Symfony\Component\Config\Definition\ConfigurationInterface;
  13. use Twig\Extra\TwigExtraBundle\Extensions;
  14. class Configuration implements ConfigurationInterface
  15. {
  16.     public function getConfigTreeBuilder(): TreeBuilder
  17.     {
  18.         $treeBuilder = new TreeBuilder('twig_extra');
  19.         $rootNode $treeBuilder->getRootNode();
  20.         foreach (Extensions::getClasses() as $name => $class) {
  21.             $rootNode
  22.                 ->children()
  23.                     ->arrayNode($name)
  24.                         ->{class_exists($class) ? 'canBeDisabled' 'canBeEnabled'}()
  25.                     ->end()
  26.                 ->end()
  27.             ;
  28.         }
  29.         return $treeBuilder;
  30.     }
  31. }