vendor/breithbarbot/cropper-bundle/DependencyInjection/Configuration.php line 27

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Cropper package.
  4.  *
  5.  * (c) Breith Barbot <b.breith@gmail.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 Breithbarbot\CropperBundle\DependencyInjection;
  11. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  12. use Symfony\Component\Config\Definition\ConfigurationInterface;
  13. class Configuration implements ConfigurationInterface
  14. {
  15.     /**
  16.      * {@inheritdoc}
  17.      *
  18.      * @throws \RuntimeException
  19.      */
  20.     public function getConfigTreeBuilder()
  21.     {
  22.         $treeBuilder = new TreeBuilder();
  23.         $rootNode $treeBuilder->root('breithbarbot_cropper');
  24.         $rootNode
  25.             ->children()
  26.                 ->arrayNode('mappings')
  27.                     ->useAttributeAsKey('id')
  28.                     ->prototype('array')
  29.                         ->children()
  30.                             ->arrayNode('routes')
  31.                                 ->isRequired()
  32.                                 ->children()
  33.                                     ->scalarNode('path_add')->isRequired()->cannotBeEmpty()->end()
  34.                                     ->scalarNode('path_delete')->end()
  35.                                 ->end()
  36.                             ->end()
  37.                             ->scalarNode('width')->defaultValue(1280)->end()
  38.                             ->scalarNode('height')->defaultValue(720)->end()
  39.                             ->scalarNode('ratio')->defaultValue('16/9')->end()
  40.                         ->end()
  41.                     ->end()
  42.                 ->end()
  43.             ->end()
  44.         ->end();
  45.         return $treeBuilder;
  46.     }
  47. }