You are here

public function Resource::getAuthorUrl in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getAuthorUrl()
  2. 9 core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getAuthorUrl()

Returns the URL of the resource author.

Return value

\Drupal\Core\Url|null The absolute URL of the resource author, or NULL if none is provided.

File

core/modules/media/src/OEmbed/Resource.php, line 395

Class

Resource
Value object representing an oEmbed resource.

Namespace

Drupal\media\OEmbed

Code

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