public function IngredientSettingsForm::submitForm in Recipe 8.2
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
- modules/
ingredient/ src/ Form/ IngredientSettingsForm.php, line 100
Class
- IngredientSettingsForm
- Configure ingredient settings for this site.
Namespace
Drupal\ingredient\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this
->config('ingredient.settings')
->set('ingredient_name_normalize', $values['ingredient_name_normalize'])
->save();
parent::submitForm($form, $form_state);
}