protected function MediaPdfThumbnailImageManager::getGenericThumbnail in Media PDF Thumbnail 8.4
Return value
int|string|null
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 call to MediaPdfThumbnailImageManager::getGenericThumbnail()
File
- src/
Manager/ MediaPdfThumbnailImageManager.php, line 132
Class
- MediaPdfThumbnailImageManager
- Class MediaPdfThumbnailImageManager.
Namespace
Drupal\media_pdf_thumbnail\ManagerCode
protected function getGenericThumbnail() {
$uri = $this->configFactory
->get('media.settings')
->get('icon_base_uri');
$files = $this->entityTypeManager
->getStorage('file')
->loadByProperties([
'uri' => $uri . '/' . self::GENERIC_FILENAME,
]);
return !empty($files) ? reset($files)
->id() : NULL;
}