Added config setting to disable password-reset and user-registration (#261)

This commit is contained in:
Kevin Papst
2018-08-09 20:44:49 +02:00
committed by GitHub
parent 39ea44fdc3
commit 3dcd38eca7
13 changed files with 230 additions and 53 deletions

View File

@@ -35,7 +35,7 @@ class DocumentationLinkExtension extends AbstractTypeExtension
*/
public function buildView(FormView $view, FormInterface $form, array $options)
{
$view->vars['documentation'] = $options['documentation'] ?? '';
$view->vars['docu_chapter'] = $options['docu_chapter'] ?? null;
}
/**
@@ -43,7 +43,8 @@ class DocumentationLinkExtension extends AbstractTypeExtension
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefined(['documentation']);
$resolver->setDefaults(['documentation' => null]);
$resolver->setDefined(['docu_chapter']);
$resolver->setAllowedTypes('docu_chapter', 'string');
$resolver->setDefault('docu_chapter', '');
}
}