You are here

public function Resource::getHtml in Drupal 10

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

Returns the HTML representation of the resource.

Only applies to 'rich' and 'video' resources.

Return value

string|null The HTML representation of the resource, if it has one.

File

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

Class

Resource
Value object representing an oEmbed resource.

Namespace

Drupal\media\OEmbed

Code

public function getHtml() {
  return isset($this->html) ? (string) $this->html : NULL;
}