public function HidePreviewConfigForm::submitForm in Hide Preview Button 8
Handles the post validation process.
Overrides ConfigFormBase::submitForm
File
- src/
Form/ HidePreviewConfigForm.php, line 91
Class
- HidePreviewConfigForm
- This class renders and manages the configuration form of the module.
Namespace
Drupal\hide_preview\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$formNames = $form_state
->getValue('form_names');
$formNames = $this
->multiline2Array($formNames);
$config = $this
->config('hide_preview.settings');
$config
->set('hide_preview.form_names', $formNames);
$config
->save();
parent::submitForm($form, $form_state);
}