You are here

public function PDFPreviewSettingsForm::submitForm in PDFPreview 8

Same name and namespace in other branches
  1. 2.0.x src/PdfPreviewSettingsForm.php \Drupal\pdfpreview\PdfPreviewSettingsForm::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

src/PDFPreviewSettingsForm.php, line 93

Class

PDFPreviewSettingsForm
Configure PDF preview settings for this site.

Namespace

Drupal\pdfpreview

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('pdfpreview.settings')
    ->set('path', $form_state
    ->getValue('path'))
    ->set('size', $form_state
    ->getValue('size'))
    ->set('quality', $form_state
    ->getValue('quality'))
    ->set('filenames', $form_state
    ->getValue('filenames'))
    ->set('type', $form_state
    ->getValue('type'))
    ->save();
  parent::submitForm($form, $form_state);
}