]> Raphaƫl G. Git Repositories - userbundle/blobdiff - DependencyInjection/Configuration.php
Add strict
[userbundle] / DependencyInjection / Configuration.php
index 4d2d3bf2c1a3f7c9e160a2b9edd87d6c5414aa49..829a1aa4c571a65301ec0d96d8c46020cfa813f6 100644 (file)
@@ -14,10 +14,12 @@ namespace Rapsys\UserBundle\DependencyInjection;
 use Symfony\Component\Config\Definition\Builder\TreeBuilder;
 use Symfony\Component\Config\Definition\ConfigurationInterface;
 
 use Symfony\Component\Config\Definition\Builder\TreeBuilder;
 use Symfony\Component\Config\Definition\ConfigurationInterface;
 
+use Rapsys\UserBundle\RapsysUserBundle;
+
 /**
  * This is the class that validates and merges configuration from your app/config files.
  *
 /**
  * This is the class that validates and merges configuration from your app/config files.
  *
- * @link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
+ * @link http://symfony.com/doc/current/cookbook/bundles/configuration.html
  *
  * {@inheritdoc}
  */
  *
  * {@inheritdoc}
  */
@@ -27,7 +29,7 @@ class Configuration implements ConfigurationInterface {
         */
        public function getConfigTreeBuilder(): TreeBuilder {
                //Set tree builder
         */
        public function getConfigTreeBuilder(): TreeBuilder {
                //Set tree builder
-               $treeBuilder = new TreeBuilder('rapsys_user');
+               $treeBuilder = new TreeBuilder(RapsysUserBundle::getAlias());
 
                //The bundle default values
                $defaults = [
 
                //The bundle default values
                $defaults = [
@@ -79,8 +81,9 @@ class Configuration implements ConfigurationInterface {
                        'edit' => [
                                'route' => ['index' => 'index_url'],
                                'view' => [
                        'edit' => [
                                'route' => ['index' => 'index_url'],
                                'view' => [
-                                       'form' => 'Rapsys\UserBundle\Form\RegisterType',
                                        'name' => '@RapsysUser/form/register.html.twig',
                                        'name' => '@RapsysUser/form/register.html.twig',
+                                       'edit' => 'Rapsys\UserBundle\Form\RegisterType',
+                                       'reset' => 'Rapsys\UserBundle\Form\LoginType',
                                        'context' => []
                                ]
                        ],
                                        'context' => []
                                ]
                        ],
@@ -96,7 +99,7 @@ class Configuration implements ConfigurationInterface {
                                'route' => ['index' => 'index_url', 'recover' => 'recover_url'],
                                'view' => [
                                        'name' => '@RapsysUser/form/recover.html.twig',
                                'route' => ['index' => 'index_url', 'recover' => 'recover_url'],
                                'view' => [
                                        'name' => '@RapsysUser/form/recover.html.twig',
-                                       'form' => 'Rapsys\UserBundle\Form\RecoverType',
+                                       'form' => 'Rapsys\UserBundle\Form\LoginType',
                                        'context' => []
                                ],
                                'mail' => [
                                        'context' => []
                                ],
                                'mail' => [
@@ -109,8 +112,8 @@ class Configuration implements ConfigurationInterface {
                        'register' => [
                                'route' => ['index' => 'index_url', 'confirm' => 'confirm_url'],
                                'view' => [
                        'register' => [
                                'route' => ['index' => 'index_url', 'confirm' => 'confirm_url'],
                                'view' => [
-                                       'form' => 'Rapsys\UserBundle\Form\RegisterType',
                                        'name' => '@RapsysUser/form/register.html.twig',
                                        'name' => '@RapsysUser/form/register.html.twig',
+                                       'form' => 'Rapsys\UserBundle\Form\RegisterType',
                                        'context' => []
                                ],
                                'mail' => [
                                        'context' => []
                                ],
                                'mail' => [
@@ -258,7 +261,8 @@ class Configuration implements ConfigurationInterface {
                                                        ->arrayNode('view')
                                                                ->addDefaultsIfNotSet()
                                                                ->children()
                                                        ->arrayNode('view')
                                                                ->addDefaultsIfNotSet()
                                                                ->children()
-                                                                       ->scalarNode('form')->cannotBeEmpty()->defaultValue($defaults['edit']['view']['form'])->end()
+                                                                       ->scalarNode('edit')->cannotBeEmpty()->defaultValue($defaults['edit']['view']['edit'])->end()
+                                                                       ->scalarNode('reset')->cannotBeEmpty()->defaultValue($defaults['edit']['view']['reset'])->end()
                                                                        ->scalarNode('name')->cannotBeEmpty()->defaultValue($defaults['edit']['view']['name'])->end()
                                                                        ->arrayNode('context')
                                                                                ->treatNullLike([])
                                                                        ->scalarNode('name')->cannotBeEmpty()->defaultValue($defaults['edit']['view']['name'])->end()
                                                                        ->arrayNode('context')
                                                                                ->treatNullLike([])