function Resource::getWidth

Same name in other branches
  1. 8.9.x core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getWidth()
  2. 10 core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getWidth()
  3. 11.x core/modules/media/src/OEmbed/Resource.php \Drupal\media\OEmbed\Resource::getWidth()

Returns the width of the resource.

Return value

int|null The width of the resource in pixels, or NULL if the resource has no width.

File

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

Class

Resource
Value object representing an oEmbed resource.

Namespace

Drupal\media\OEmbed

Code

public function getWidth() {
    return $this->width;
}

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