function ThemeAdminForm::submitForm

Same name in other branches
  1. 9 core/modules/system/src/Form/ThemeAdminForm.php \Drupal\system\Form\ThemeAdminForm::submitForm()
  2. 8.9.x core/modules/system/src/Form/ThemeAdminForm.php \Drupal\system\Form\ThemeAdminForm::submitForm()
  3. 10 core/modules/system/src/Form/ThemeAdminForm.php \Drupal\system\Form\ThemeAdminForm::submitForm()

Overrides ConfigFormBase::submitForm

File

core/modules/system/src/Form/ThemeAdminForm.php, line 58

Class

ThemeAdminForm
Form to select the administration theme.

Namespace

Drupal\system\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);
    $this->config('system.theme')
        ->set('admin', $form_state->getValue('admin_theme'))
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.