You are here

function media_pdf_thumbnail_media_presave in Media PDF Thumbnail 8

Same name and namespace in other branches
  1. 8.4 media_pdf_thumbnail.module \media_pdf_thumbnail_media_presave()
  2. 8.2 media_pdf_thumbnail.module \media_pdf_thumbnail_media_presave()
  3. 8.3 media_pdf_thumbnail.module \media_pdf_thumbnail_media_presave()

Implements hook_ENTITY_TYPE_presave().

@inheritdoc

File

./media_pdf_thumbnail.module, line 37
Contains media_pdf_thumbnail.module.

Code

function media_pdf_thumbnail_media_presave(EntityInterface $entity) {
  Drupal::service('media_pdf_thumbnail.image.manager')
    ->createThumbnail($entity);
}