You are here

protected function Media::getDefaultThumbnailUri in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getDefaultThumbnailUri()
  2. 9 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 211

Class

Media
Defines the media entity class.

Namespace

Drupal\media\Entity

Code

protected function getDefaultThumbnailUri() {
  $default_thumbnail_filename = $this
    ->getSource()
    ->getPluginDefinition()['default_thumbnail_filename'];
  return \Drupal::config('media.settings')
    ->get('icon_base_uri') . '/' . $default_thumbnail_filename;
}