You are here

public function EmbedSettingsForm::submitForm in Embed 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/EmbedSettingsForm.php, line 106

Class

EmbedSettingsForm
Configure embed settings for this site.

Namespace

Drupal\embed\Form

Code

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