public function SettingsForm::submitForm in Trailing Slash 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/
Form/ SettingsForm.php, line 117
Class
- SettingsForm
- Class SettingsForm
Namespace
Drupal\trailing_slash\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('trailing_slash.settings')
->set('enabled', $form_state
->getValue('enabled'))
->set('paths', $form_state
->getValue('paths'))
->set('enabled_entity_types', serialize($form_state
->getValue('enabled_entity_types')))
->save();
}