vendor/coreshop/pimcore-bundle/DependencyInjection/Configuration.php line 27

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\PimcoreBundle\DependencyInjection;
  13. use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
  14. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  15. use Symfony\Component\Config\Definition\ConfigurationInterface;
  16. final class Configuration implements ConfigurationInterface
  17. {
  18.     /**
  19.      * {@inheritdoc}
  20.      */
  21.     public function getConfigTreeBuilder()
  22.     {
  23.         $treeBuilder = new TreeBuilder();
  24.         $rootNode $treeBuilder->root('core_shop_pimcore');
  25.         $this->addPimcoreResourcesSection($rootNode);
  26.         return $treeBuilder;
  27.     }
  28.     /**
  29.      * @param ArrayNodeDefinition $node
  30.      */
  31.     private function addPimcoreResourcesSection(ArrayNodeDefinition $node)
  32.     {
  33.         $node->children()
  34.             ->arrayNode('pimcore_admin')
  35.                 ->addDefaultsIfNotSet()
  36.                 ->children()
  37.                     ->arrayNode('js')
  38.                         ->useAttributeAsKey('name')
  39.                         ->prototype('scalar')->end()
  40.                     ->end()
  41.                     ->arrayNode('css')
  42.                         ->useAttributeAsKey('name')
  43.                         ->prototype('scalar')->end()
  44.                     ->end()
  45.                     ->arrayNode('editmode_js')
  46.                         ->useAttributeAsKey('name')
  47.                         ->prototype('scalar')->end()
  48.                     ->end()
  49.                     ->arrayNode('editmode_css')
  50.                         ->useAttributeAsKey('name')
  51.                         ->prototype('scalar')->end()
  52.                     ->end()
  53.                 ->end()
  54.             ->end()
  55.         ->end();
  56.     }
  57. }