You are here

public function ThumbnailGenerationSettingsForm::submitForm in Media PDF Thumbnail 8.4

Same name and namespace in other branches
  1. 8.3 src/Form/ThumbnailGenerationSettingsForm.php \Drupal\media_pdf_thumbnail\Form\ThumbnailGenerationSettingsForm::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 FormInterface::submitForm

File

src/Form/ThumbnailGenerationSettingsForm.php, line 110

Class

ThumbnailGenerationSettingsForm
Class ThumbnailGenerationSettingsForm

Namespace

Drupal\media_pdf_thumbnail\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->getValue('regenerate_all')) {
    $this->mediaPdfThumbnailService
      ->regenerateAllThumbnails();
  }
  else {
    $this->mediaPdfThumbnailQueueManager
      ->executeQueue();
  }
}