public function Soundcloud::thumbnail in Media entity Soundcloud 8
Gets thumbnail image.
Media type plugin is responsible for returning URI of the generic thumbnail if no other is available. This functions should always return a valid URI.
Parameters
MediaInterface $media: Media.
Return value
string URI of the thumbnail.
Overrides MediaTypeInterface::thumbnail
File
- src/
Plugin/ MediaEntity/ Type/ Soundcloud.php, line 163
Class
- Soundcloud
- Provides media type plugin for Soundcloud.
Namespace
Drupal\media_entity_soundcloud\Plugin\MediaEntity\TypeCode
public function thumbnail(MediaInterface $media) {
if ($thumbnail_image = $this
->getField($media, 'thumbnail_uri')) {
return $thumbnail_image;
}
return $this
->getDefaultThumbnail();
}