function Media::getDefaultThumbnailUri
Same name in other branches
- 9 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getDefaultThumbnailUri()
- 8.9.x core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getDefaultThumbnailUri()
- 10 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getDefaultThumbnailUri()
Returns the URI of the default thumbnail.
Return value
string The default thumbnail URI.
2 calls to Media::getDefaultThumbnailUri()
- Media::getThumbnailUri in core/
modules/ media/ src/ Entity/ Media.php - Gets the URI for the thumbnail of a media item.
- Media::loadThumbnail in core/
modules/ media/ src/ Entity/ Media.php - Loads the file entity for the thumbnail.
File
-
core/
modules/ media/ src/ Entity/ Media.php, line 219
Class
- Media
- Defines the media entity class.
Namespace
Drupal\media\EntityCode
protected function getDefaultThumbnailUri() {
$default_thumbnail_filename = $this->getSource()
->getPluginDefinition()['default_thumbnail_filename'];
return \Drupal::config('media.settings')->get('icon_base_uri') . '/' . $default_thumbnail_filename;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.