public function AdminSettingsForm::buildForm in Password Reset Landing Page (PRLP) 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ AdminSettingsForm.php, line 39 - Contains Drupal\prlp\Form\AdminSettingsForm.
Class
- AdminSettingsForm
- Class AdminSettingsForm.
Namespace
Drupal\prlp\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('prlp.settings');
$form['password_required'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('Password Entry Required'),
'#description' => $this
->t('If set, users will be required to enter a new password when they use a password reset link to login'),
'#default_value' => $config
->get('password_required'),
);
$form['login_destination'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Login Destination'),
'#description' => $this
->t('User will be taken to this path after they log in with the password reset link. Token %user can be used in the path, and will be replaced with the uid of the current user. Use %front for site front-page.'),
// '#maxlength' => 64,
// '#size' => 64,
'#default_value' => $config
->get('login_destination'),
);
return parent::buildForm($form, $form_state);
}