vendor/coreshop/resource-bundle/Routing/Configuration.php line 26

Open in your IDE?
  1. <?php
  2. /**
  3.  * CoreShop.
  4.  *
  5.  * This source file is subject to the GNU General Public License version 3 (GPLv3)
  6.  * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
  7.  * files that are distributed with this source code.
  8.  *
  9.  * @copyright  Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)
  10.  * @license    https://www.coreshop.org/license     GNU General Public License version 3 (GPLv3)
  11. */
  12. namespace CoreShop\Bundle\ResourceBundle\Routing;
  13. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  14. use Symfony\Component\Config\Definition\ConfigurationInterface;
  15. final class Configuration implements ConfigurationInterface
  16. {
  17.     /**
  18.      * {@inheritdoc}
  19.      */
  20.     public function getConfigTreeBuilder()
  21.     {
  22.         $treeBuilder = new TreeBuilder();
  23.         $rootNode $treeBuilder->root('routing');
  24.         $rootNode
  25.             ->children()
  26.                 ->scalarNode('alias')->cannotBeEmpty()->end()
  27.                 ->scalarNode('path')->cannotBeEmpty()->end()
  28.                 ->scalarNode('identifier')->defaultValue('id')->end()
  29.                 ->arrayNode('only')
  30.                     ->prototype('scalar')->end()
  31.                 ->end()
  32.                 ->scalarNode('no_default_routes')->defaultFalse()->end()
  33.                 ->arrayNode('additional_routes')
  34.                     ->prototype('array')
  35.                         ->children()
  36.                             ->scalarNode('path')->end()
  37.                             ->scalarNode('action')->end()
  38.                             ->arrayNode('methods')
  39.                                 ->prototype('scalar')->end()
  40.                             ->end()
  41.                         ->end()
  42.                     ->end()
  43.                 ->end()
  44.             ->end();
  45.         return $treeBuilder;
  46.     }
  47. }