function MediaSettingsForm::submitForm

Same name in other branches
  1. 9 core/modules/media/src/Form/MediaSettingsForm.php \Drupal\media\Form\MediaSettingsForm::submitForm()

Overrides ConfigFormBase::submitForm

File

core/modules/media/src/Form/MediaSettingsForm.php, line 119

Class

MediaSettingsForm
Provides a form to configure Media settings.

Namespace

Drupal\media\Form

Code

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

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