public function CloseBlockSettingsForm::submitForm in Close Block 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/ CloseBlockSettingsForm.php, line 131
Class
- CloseBlockSettingsForm
- Provides a module settings form.
Namespace
Drupal\closeblock\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$factory = $this->configFactory
->getEditable('closeblock.settings');
$factory
->set('close_block_type', $form_state
->getValue('close_block_type'));
$factory
->set('close_block_speed', $form_state
->getValue('close_block_speed'));
$factory
->set('reset_cookie_time', $form_state
->getValue('reset_cookie_time'));
$factory
->set('close_block_button_text', $form_state
->getValue('close_block_button_text'));
$factory
->save();
}