You are here

public function CKEditorMediaEmbedSettingsForm::submitForm in CKEditor Media Embed Plugin 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/CKEditorMediaEmbedSettingsForm.php, line 163

Class

CKEditorMediaEmbedSettingsForm
Class CKEditorMediaEmbedSettingsForm.

Namespace

Drupal\ckeditor_media_embed\Form

Code

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