You are here

public function MediaThumbnailManager::hasPlugin in Media Thumbnails 8

Check if the media source has a thumbnail plugin.

Parameters

\Drupal\media\MediaInterface $media: The media entity.

Return value

bool TRUE if there is a plugin, FALSE otherwise.

File

src/Plugin/MediaThumbnailManager.php, line 273

Class

MediaThumbnailManager
Provides the Media thumbnail plugin manager.

Namespace

Drupal\media_thumbnails\Plugin

Code

public function hasPlugin(MediaInterface $media) : bool {
  return (bool) $this
    ->getPluginId($media);
}