public function ScannerAdminForm::submitForm in Search and Replace Scanner 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/ ScannerAdminForm.php, line 196
Class
- ScannerAdminForm
- Form for configuring the default scanner settings.
Namespace
Drupal\scanner\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('scanner.admin_settings')
->set('scanner_mode', $form_state
->getValue('scanner_mode'))
->set('scanner_regex', $form_state
->getValue('scanner_regex'))
->set('scanner_wholeword', $form_state
->getValue('scanner_wholeword'))
->set('scanner_published', $form_state
->getValue('scanner_published'))
->set('scanner_pathauto', $form_state
->getValue('scanner_pathauto'))
->set('scanner_language', $form_state
->getValue('scanner_language'))
->set('enabled_content_types', array_filter($form_state
->getValue('enabled_content_types')))
->set('fields_of_selected_content_type', array_filter($form_state
->getValue('fields_of_selected_content_type')))
->save();
parent::submitForm($form, $form_state);
}