You are here

function media_pdf_thumbnail_media_presave in Media PDF Thumbnail 8.4

Same name and namespace in other branches
  1. 8 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().

File

./media_pdf_thumbnail.module, line 35
Contains media_pdf_thumbnail.module.

Code

function media_pdf_thumbnail_media_presave(MediaInterface $media) {
  $mediaThumbnailService = Drupal::service('media_pdf_thumbnail.service');
  $mediaThumbnailService
    ->previousFileDelete($media);
}