public function RealnameAdminSettingsForm::submitForm in Real Name 8
Same name and namespace in other branches
- 2.x src/Form/RealnameAdminSettingsForm.php \Drupal\realname\Form\RealnameAdminSettingsForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides ConfigFormBase::submitForm
File
- src/
Form/ RealnameAdminSettingsForm.php, line 85
Class
- RealnameAdminSettingsForm
- Configure Realname settings for this site.
Namespace
Drupal\realname\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('realname.settings');
if ($form['general']['realname_pattern']['#default_value'] != $form_state
->getValue('realname_pattern')) {
$config
->set('pattern', $form_state
->getValue('realname_pattern'))
->save();
}
parent::submitForm($form, $form_state);
}