public function AutofloatSettingsForm::submitForm in AutoFloat 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/ AutofloatSettingsForm.php, line 100
Class
- AutofloatSettingsForm
- Class AutofloatSettingsForm.
Namespace
Drupal\autofloat\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->configFactory
->getEditable('autofloat.settings');
$config
->set('start', $form_state
->getValue('autofloat_start'))
->set('css', $form_state
->getValue('autofloat_css'))
->set('target', $form_state
->getValue('autofloat_target'))
->set('selector', $form_state
->getValue('autofloat_selector'))
->set('rejector', $form_state
->getValue('autofloat_rejector'));
$config
->save();
drupal_flush_all_caches();
parent::submitForm($form, $form_state);
}