public function AutoEntityLabelForm::submitForm in Automatic Entity Label 8
Same name and namespace in other branches
- 8.3 src/Form/AutoEntityLabelForm.php \Drupal\auto_entitylabel\Form\AutoEntityLabelForm::submitForm()
- 8.2 src/Form/AutoEntityLabelForm.php \Drupal\auto_entitylabel\Form\AutoEntityLabelForm::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/ AutoEntityLabelForm.php, line 170
Class
- AutoEntityLabelForm
- Class AutoEntityLabelForm.
Namespace
Drupal\auto_entitylabel\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->configFactory
->getEditable('auto_entitylabel.settings');
foreach ($form_state
->getValues() as $key => $value) {
$config
->set($key, $value);
}
$config
->save();
parent::submitForm($form, $form_state);
}