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.
*
- * @link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
+ * @link http://symfony.com/doc/current/cookbook/bundles/configuration.html
*
* {@inheritdoc}
*/
*/
public function getConfigTreeBuilder(): TreeBuilder {
//Set tree builder
- $treeBuilder = new TreeBuilder('rapsys_user');
+ $treeBuilder = new TreeBuilder(RapsysUserBundle::getAlias());
//The bundle default values
$defaults = [
'edit' => [
'route' => ['index' => 'index_url'],
'view' => [
- 'form' => 'Rapsys\UserBundle\Form\RegisterType',
'name' => '@RapsysUser/form/register.html.twig',
+ 'edit' => 'Rapsys\UserBundle\Form\RegisterType',
+ 'reset' => 'Rapsys\UserBundle\Form\LoginType',
'context' => []
]
],
'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' => [
'register' => [
'route' => ['index' => 'index_url', 'confirm' => 'confirm_url'],
'view' => [
- 'form' => 'Rapsys\UserBundle\Form\RegisterType',
'name' => '@RapsysUser/form/register.html.twig',
+ 'form' => 'Rapsys\UserBundle\Form\RegisterType',
'context' => []
],
'mail' => [
->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([])