1
0
mirror of synced 2024-11-28 15:46:04 +03:00
service-bundle/DependencyInjection/Configuration.php
Кривич Сергей 897df39d96 Update code base
2022-07-20 14:38:42 +03:00

59 lines
2.4 KiB
PHP

<?php
namespace RetailCrm\ServiceBundle\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('retail_crm_service');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
->arrayNode('request_schema')
->children()
->arrayNode('callback')
->children()
->arrayNode('supports')
->arrayPrototype()
->children()
->scalarNode('type')->isRequired()->end()
->arrayNode('params')
->isRequired()->scalarPrototype()->end()
->end()
->end()
->end()
->end()
->scalarNode('serializer')
->defaultValue('retail_crm_service.symfony_serializer.adapter')
->end()
->end()
->end()
->arrayNode('client')
->children()
->arrayNode('supports')
->scalarPrototype()->end()
->end()
->scalarNode('serializer')
->defaultValue('retail_crm_service.symfony_serializer.adapter')
->end()
->end()
->end()
->end()
->end()
->arrayNode('messenger')
->children()
->scalarNode('message_handler')->isRequired()->defaultValue('simple_console_runner')->end()
->scalarNode('process_timeout')->end()
->end()
->end()
->end();
return $treeBuilder;
}
}