public function GeofieldMapSettingsForm::submitForm in Geofield Map 8
Same name and namespace in other branches
- 8.2 src/Form/GeofieldMapSettingsForm.php \Drupal\geofield_map\Form\GeofieldMapSettingsForm::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/ GeofieldMapSettingsForm.php, line 92
Class
- GeofieldMapSettingsForm
- Implements the GeofieldMapSettingsForm controller.
Namespace
Drupal\geofield_map\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->configFactory()
->getEditable('geofield_map.settings');
$config
->set('gmap_api_key', $form_state
->getValue('gmap_api_key'));
$config
->save();
// Confirmation on form submission.
drupal_set_message($this
->t('The Geofield Map configurations have been saved.'));
}