You are here

public function MediaThumbnailConfigForm::submitForm in Media Thumbnails 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/MediaThumbnailConfigForm.php, line 84

Class

MediaThumbnailConfigForm
Implements the media thumbnails config form.

Namespace

Drupal\media_thumbnails\Form

Code

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