]> Raphaël G. Git Repositories - userbundle/commitdiff
Add new field configuration entry
authorRaphaël Gertz <git@rapsys.eu>
Sat, 28 Aug 2021 09:03:12 +0000 (11:03 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Sat, 28 Aug 2021 09:03:12 +0000 (11:03 +0200)
DependencyInjection/Configuration.php

index 829a1aa4c571a65301ec0d96d8c46020cfa813f6..ade173ffef0f0dc305b4905314a8b39af5c23737 100644 (file)
@@ -1,7 +1,7 @@
 <?php declare(strict_types=1);
 
 /*
- * This file is part of the Rapsys PackBundle package.
+ * This file is part of the Rapsys UserBundle package.
  *
  * (c) Raphaël Gertz <symfony@rapsys.eu>
  *
@@ -79,6 +79,7 @@ class Configuration implements ConfigurationInterface {
                        ],
                        'context' => [],
                        'edit' => [
+                               'field' => [],
                                'route' => ['index' => 'index_url'],
                                'view' => [
                                        'name' => '@RapsysUser/form/register.html.twig',
@@ -110,6 +111,7 @@ class Configuration implements ConfigurationInterface {
                                ]
                        ],
                        'register' => [
+                               'field' => [],
                                'route' => ['index' => 'index_url', 'confirm' => 'confirm_url'],
                                'view' => [
                                        'name' => '@RapsysUser/form/register.html.twig',
@@ -253,6 +255,11 @@ class Configuration implements ConfigurationInterface {
                                        ->arrayNode('edit')
                                                ->addDefaultsIfNotSet()
                                                ->children()
+                                                       ->arrayNode('field')
+                                                               ->treatNullLike([])
+                                                               ->defaultValue($defaults['edit']['field'])
+                                                               ->variablePrototype()->end()
+                                                       ->end()
                                                        ->arrayNode('route')
                                                                ->treatNullLike([])
                                                                ->defaultValue($defaults['edit']['route'])
@@ -333,6 +340,11 @@ class Configuration implements ConfigurationInterface {
                                        ->arrayNode('register')
                                                ->addDefaultsIfNotSet()
                                                ->children()
+                                                       ->arrayNode('field')
+                                                               ->treatNullLike([])
+                                                               ->defaultValue($defaults['register']['field'])
+                                                               ->variablePrototype()->end()
+                                                       ->end()
                                                        ->arrayNode('route')
                                                                ->treatNullLike([])
                                                                ->defaultValue($defaults['register']['route'])