public function SettingsForm::submitForm in Geocoder 8.3
Same name and namespace in other branches
- 8.2 src/Form/SettingsForm.php \Drupal\geocoder\Form\SettingsForm::submitForm()
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 102
Class
- SettingsForm
- The geocoder settings form.
Namespace
Drupal\geocoder\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Get all the form state values, in an array structure.
$form_state_values = $form_state
->getValues();
$config = $this
->config('geocoder.settings');
$config
->set('geocoder_presave_disabled', $form_state_values['geocoder_presave_disabled']);
$config
->set('cache', $form_state_values['cache']);
$config
->save();
parent::submitForm($form, $form_state);
}