public function Resource::getThumbnailUrl in Drupal 9
Same name and namespace in other branches
- 8 core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getThumbnailUrl()
- 10 core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getThumbnailUrl()
Returns the URL of the resource's thumbnail image.
Return value
\Drupal\Core\Url|null The absolute URL of the thumbnail image, or NULL if there isn't one.
File
- core/
modules/ media/ src/ OEmbed/ Resource.php, line 415
Class
- Resource
- Value object representing an oEmbed resource.
Namespace
Drupal\media\OEmbedCode
public function getThumbnailUrl() {
return $this->thumbnailUrl ? Url::fromUri($this->thumbnailUrl)
->setAbsolute() : NULL;
}