You are here

public function GeolocationSettings::submitForm in GeoIP API 8.2

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/GeolocationSettings.php, line 67

Class

GeolocationSettings
Settings form to configure GeoIP.

Namespace

Drupal\geoip\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('geoip.geolocation')
    ->set('plugin_id', $form_state
    ->getValue('plugin_id'))
    ->set('debug', $form_state
    ->getValue('debug'))
    ->save();
  parent::submitForm($form, $form_state);
}