You are here

public function SettingsForm::regenerateThumbnails in Media PDF Thumbnail 8.2

Same name and namespace in other branches
  1. 8 src/Form/SettingsForm.php \Drupal\media_pdf_thumbnail\Form\SettingsForm::regenerateThumbnails()

RegenerateThumbnails.

Parameters

$mid:

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

\Drupal\Core\Entity\EntityStorageException

File

src/Form/SettingsForm.php, line 108

Class

SettingsForm
Class SettingsForm.

Namespace

Drupal\media_pdf_thumbnail\Form

Code

public function regenerateThumbnails($mid) {
  $media = $this->entityTypeManager
    ->getStorage('media')
    ->load($mid);
  $media
    ->save();
}