You are here

function media_pdf_thumbnail_media_insert in Media PDF Thumbnail 8.4

Implements hook_ENTITY_TYPE_insert().

File

./media_pdf_thumbnail.module, line 56
Contains media_pdf_thumbnail.module.

Code

function media_pdf_thumbnail_media_insert(MediaInterface $media) {

  /**
   * @var \Drupal\media_pdf_thumbnail\Service\MediaPdfThumbnailService $mediaThumbnailService
   */
  $mediaThumbnailService = Drupal::service('media_pdf_thumbnail.service');
  $mediaThumbnailService
    ->handleEntity($media, 'create');
}