case static::METADATA_ATTRIBUTE_NAME:
case 'default_name':
return $file->
getFilename();
case static::METADATA_ATTRIBUTE_MIME:
return $file->
getMimeType();
case static::METADATA_ATTRIBUTE_SIZE:
return $file->
getSize();
case 'thumbnail_uri':
return $this->
getThumbnail($file) ?: parent::
getMetadata($media,
$attribute_name);
default:
return parent::
getMetadata($media,
$attribute_name);
} } /**
* Gets the thumbnail image URI based on a file entity.
*
* @param \Drupal\file\FileInterface $file
* A file entity.
*
* @return string
* File URI of the thumbnail image or NULL if there is no specific icon.
*/