public function OpignoModuleSettingsForm::submitForm in Opigno module 8
Same name and namespace in other branches
- 3.x src/Form/OpignoModuleSettingsForm.php \Drupal\opigno_module\Form\OpignoModuleSettingsForm::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/ OpignoModuleSettingsForm.php, line 44
Class
- OpignoModuleSettingsForm
- Class OpignoModuleSettingsForm.
Namespace
Drupal\opigno_module\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->configFactory
->getEditable('opigno_module.settings')
->set('description', $form_state
->getValue('description'))
->set('availability_closed_message', $form_state
->getValue('availability_closed_message'))
->set('availability_unavailable_message', $form_state
->getValue('availability_unavailable_message'))
->save();
parent::submitForm($form, $form_state);
}