You are here

public function MediaSettingsForm::submitForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/Form/MediaSettingsForm.php \Drupal\media\Form\MediaSettingsForm::submitForm()
  2. 9 core/modules/media/src/Form/MediaSettingsForm.php \Drupal\media\Form\MediaSettingsForm::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

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);
}