public function NameSettingsForm::submitForm in Name Field 8
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/
NameSettingsForm.php, line 56
Class
- NameSettingsForm
- Configure name settings for this site.
Namespace
Drupal\nameCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('name.settings')
->set('sep1', $form_state
->getValue([
'name_settings',
'sep1',
]))
->set('sep2', $form_state
->getValue([
'name_settings',
'sep2',
]))
->set('sep3', $form_state
->getValue([
'name_settings',
'sep3',
]))
->save();
parent::submitForm($form, $form_state);
}