<?php
/**
* CoreShop.
*
* This source file is subject to the GNU General Public License version 3 (GPLv3)
* For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
* files that are distributed with this source code.
*
* @copyright Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)
* @license https://www.coreshop.org/license GNU General Public License version 3 (GPLv3)
*/
namespace CoreShop\Bundle\PimcoreBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
final class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('core_shop_pimcore');
$this->addPimcoreResourcesSection($rootNode);
return $treeBuilder;
}
/**
* @param ArrayNodeDefinition $node
*/
private function addPimcoreResourcesSection(ArrayNodeDefinition $node)
{
$node->children()
->arrayNode('pimcore_admin')
->addDefaultsIfNotSet()
->children()
->arrayNode('js')
->useAttributeAsKey('name')
->prototype('scalar')->end()
->end()
->arrayNode('css')
->useAttributeAsKey('name')
->prototype('scalar')->end()
->end()
->arrayNode('editmode_js')
->useAttributeAsKey('name')
->prototype('scalar')->end()
->end()
->arrayNode('editmode_css')
->useAttributeAsKey('name')
->prototype('scalar')->end()
->end()
->end()
->end()
->end();
}
}