2021-02-05 14:47:54 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace RetailCrm\ServiceBundle\DependencyInjection;
|
|
|
|
|
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
|
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class Configuration
|
|
|
|
*
|
|
|
|
* @package RetailCrm\ServiceBundle\DependencyInjection
|
|
|
|
*/
|
|
|
|
class Configuration implements ConfigurationInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritdoc }
|
|
|
|
*/
|
|
|
|
public function getConfigTreeBuilder(): TreeBuilder
|
|
|
|
{
|
|
|
|
$treeBuilder = new TreeBuilder('retail_crm_service');
|
|
|
|
$rootNode = $treeBuilder->getRootNode();
|
|
|
|
|
|
|
|
$rootNode
|
|
|
|
->children()
|
|
|
|
->arrayNode('request_schema')
|
|
|
|
->children()
|
|
|
|
->arrayNode('callback')
|
2021-02-17 09:31:36 +03:00
|
|
|
->children()
|
|
|
|
->arrayNode('supports')
|
|
|
|
->arrayPrototype()
|
|
|
|
->children()
|
|
|
|
->scalarNode('type')->isRequired()->end()
|
|
|
|
->arrayNode('params')
|
|
|
|
->isRequired()->scalarPrototype()->end()
|
|
|
|
->end()
|
2021-02-05 14:47:54 +03:00
|
|
|
->end()
|
|
|
|
->end()
|
|
|
|
->end()
|
2021-02-17 09:31:36 +03:00
|
|
|
->scalarNode('serializer')
|
|
|
|
->defaultValue('retail_crm_service.symfony_serializer.adapter')
|
|
|
|
->end()
|
2021-02-05 14:47:54 +03:00
|
|
|
->end()
|
2021-02-17 09:31:36 +03:00
|
|
|
->end()
|
2021-02-05 14:47:54 +03:00
|
|
|
->arrayNode('client')
|
2021-02-17 09:31:36 +03:00
|
|
|
->children()
|
|
|
|
->arrayNode('supports')
|
|
|
|
->scalarPrototype()->end()
|
|
|
|
->end()
|
|
|
|
->scalarNode('serializer')
|
|
|
|
->defaultValue('retail_crm_service.symfony_serializer.adapter')
|
|
|
|
->end()
|
|
|
|
->end()
|
2021-02-05 14:47:54 +03:00
|
|
|
->end()
|
|
|
|
->end()
|
|
|
|
->end()
|
|
|
|
->end();
|
|
|
|
|
|
|
|
return $treeBuilder;
|
|
|
|
}
|
|
|
|
}
|