public function APIKeysForm::submitForm in Geocoder 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/ APIKeysForm.php, line 43 - Contains \Drupal\geocoder\Form\APIKeysForm.
Class
- APIKeysForm
- @TODO: Write something here
Namespace
Drupal\geocoder\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('geocoder.google')
->set('api_key', $form_state
->getValue('google_api_key'))
->save();
parent::submitForm($form, $form_state);
}