function Resource::getAuthorUrl

Same name in other branches
  1. 9 core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getAuthorUrl()
  2. 8.9.x core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getAuthorUrl()
  3. 10 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.