You are here

public function BasicForm::submitForm in Admin User Language 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/BasicForm.php, line 110

Class

BasicForm
Class BasicForm.

Namespace

Drupal\admin_user_language\Form

Code

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