function SettingsForm::submitForm

Same name in this branch
  1. 9 core/modules/aggregator/src/Form/SettingsForm.php \Drupal\aggregator\Form\SettingsForm::submitForm()
Same name in other branches
  1. 8.9.x core/modules/media_library/src/Form/SettingsForm.php \Drupal\media_library\Form\SettingsForm::submitForm()
  2. 8.9.x core/modules/aggregator/src/Form/SettingsForm.php \Drupal\aggregator\Form\SettingsForm::submitForm()
  3. 10 core/modules/media_library/src/Form/SettingsForm.php \Drupal\media_library\Form\SettingsForm::submitForm()
  4. 11.x core/modules/media_library/src/Form/SettingsForm.php \Drupal\media_library\Form\SettingsForm::submitForm()
  5. 11.x core/modules/navigation/src/Form/SettingsForm.php \Drupal\navigation\Form\SettingsForm::submitForm()
  6. 10 core/modules/navigation/src/Form/SettingsForm.php \Drupal\navigation\Form\SettingsForm::submitForm()

Overrides ConfigFormBase::submitForm

File

core/modules/media_library/src/Form/SettingsForm.php, line 46

Class

SettingsForm
Defines a form for configuring the Media Library module.

Namespace

Drupal\media_library\Form

Code

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

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