Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Resource.php

function 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\OEmbed

Code

public function getThumbnailUrl() {
    return $this->thumbnailUrl ? Url::fromUri($this->thumbnailUrl)
        ->setAbsolute() : NULL;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal