You are here

public function LiveWeatherSettingsForm::submitForm in Live Weather 8

Same name and namespace in other branches
  1. 8.2 src/Form/LiveWeatherSettingsForm.php \Drupal\live_weather\Form\LiveWeatherSettingsForm::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/LiveWeatherSettingsForm.php, line 113
Contains \Drupal\live_weather\Form\LiveWeatherSettingsForm.

Class

LiveWeatherSettingsForm
Controller location for Live Weather Settings Form.

Namespace

Drupal\live_weather\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $form_value = $form_state
    ->getValue('settings');
  $this
    ->config('live_weather.settings')
    ->set('settings', $form_value)
    ->save();
  parent::submitForm($form, $form_state);
}