<?php declare(strict_types=1); /* * This file is part of vonRotenberg Shopware API Bundle. * * (c) vonRotenberg * * @license proprietary */ namespace vonRotenberg\ShopwareApiBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('vonrotenberg_shopware_api'); $treeBuilder ->getRootNode() ->children() ->arrayNode('credentials') ->addDefaultsIfNotSet() ->children() ->scalarNode('client_id') ->info('Your Shopware client ID.') ->defaultValue('') ->end() ->scalarNode('client_secret') ->info('Your Shopware client secret.') ->defaultValue('') ->end() ->scalarNode('api_endpoint') ->info('The endpoint URL of your Shopware installation.') ->defaultValue('') ->end() ->end() ->end() ->arrayNode('mappings') ->addDefaultsIfNotSet() ->children() ->arrayNode('properties') ->info('Shopware property mappings (SWUUID: ext. value)') ->defaultValue([]) ->arrayPrototype() ->scalarPrototype() ->cannotBeEmpty() ->end() ->end() ->end() ->arrayNode('property_groups') ->info('Shopware property groups (SWUUID: ext. value)') ->defaultValue([]) ->scalarPrototype() ->cannotBeEmpty() ->end() ->end() ->arrayNode('units') ->info('Shopware units (SWUUID: ext. value)') ->defaultValue([]) ->scalarPrototype() ->cannotBeEmpty() ->end() ->end() ->arrayNode('currencies') ->info('Shopware currencies (SWUUID: ext. value)') ->defaultValue([]) ->scalarPrototype() ->cannotBeEmpty() ->end() ->end() ->end() ->end() ->end() ; return $treeBuilder; } }