You are here

public function DropdownLanguageSettings::submitForm in Dropdown Language 8

Same name and namespace in other branches
  1. 8.3 src/Form/DropdownLanguageSettings.php \Drupal\dropdown_language\Form\DropdownLanguageSettings::submitForm()
  2. 8.2 src/Form/DropdownLanguageSettings.php \Drupal\dropdown_language\Form\DropdownLanguageSettings::submitForm()
  3. 3.0.x src/Form/DropdownLanguageSettings.php \Drupal\dropdown_language\Form\DropdownLanguageSettings::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/DropdownLanguageSettings.php, line 64

Class

DropdownLanguageSettings
Provides a configuration form for global settings.

Namespace

Drupal\dropdown_language\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('dropdown_language.setting')
    ->set('wrapper', $form_state
    ->getValue('wrapper'))
    ->set('display_language_id', $form_state
    ->getValue('display_language_id'))
    ->save();
  parent::submitForm($form, $form_state);

  // @todo Pass cache tags to module's block to properly invalidate cache.
}