From 3836622d2733040ef7c76fa8ed85675dcceec876 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 18 Jul 2024 16:03:45 +0200 Subject: [PATCH] Use better namespacing for configuring workflow signature documents --- .../ChillMainExtension.php | 4 +- .../DependencyInjection/Configuration.php | 48 ++++++++++--------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index bf041b5b3..0d90854b4 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -194,8 +194,8 @@ class ChillMainExtension extends Extension implements ); $container->setParameter( - 'chill_main.id_document_kinds', - $config['id_document_kinds'] + 'chill_main.workflow_signatures.base_signer.document_kinds', + $config['workflow_signature']['base_signer']['document_kinds'] ); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config')); diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php b/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php index 9c890d9fe..2185375b6 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php @@ -151,28 +151,6 @@ class Configuration implements ConfigurationInterface ->append($this->addWidgetsConfiguration('homepage', $this->containerBuilder)) ->end() // end of widgets/children ->end() // end of widgets - ->arrayNode('id_document_kinds')->defaultValue([]) - ->arrayPrototype() - ->children() - ->scalarNode('key')->isRequired()->cannotBeEmpty() - ->info('the key stored in database') - ->example('id_card') - ->end() - ->arrayNode('labels')->isRequired()->requiresAtLeastOneElement() - ->arrayPrototype() - ->children() - ->scalarNode('lang')->isRequired()->cannotBeEmpty() - ->example('fr') - ->end() - ->scalarNode('label')->isRequired()->cannotBeEmpty() - ->example('Carte de séjour') - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() // end of document types ->arrayNode('cruds') ->defaultValue([]) ->arrayPrototype() @@ -299,6 +277,32 @@ class Configuration implements ConfigurationInterface ->end() // end of root ; + $rootNode->children() + ->arrayNode('workflow_signature') + ->children() + ->arrayNode('base_signer') + ->children() + ->arrayNode('document_kinds') + ->arrayPrototype() + ->children() + ->scalarNode('key')->cannotBeEmpty()->end() + ->arrayNode('labels') + ->arrayPrototype() + ->children() + ->scalarNode('lang')->cannotBeEmpty()->end() + ->scalarNode('label')->cannotBeEmpty()->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end(); + $rootNode->children() ->arrayNode('add_address')->addDefaultsIfNotSet()->children() ->scalarNode('default_country')->cannotBeEmpty()->defaultValue('BE')->end()