function Media::getSource

Same name in other branches
  1. 9 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getSource()
  2. 8.9.x core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getSource()
  3. 11.x core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getSource()

Overrides MediaInterface::getSource

8 calls to Media::getSource()
Media::getName in core/modules/media/src/Entity/Media.php
Gets the media item name.
Media::getThumbnailHeight in core/modules/media/src/Entity/Media.php
Gets the height of the thumbnail of a media item.
Media::getThumbnailUri in core/modules/media/src/Entity/Media.php
Gets the URI for the thumbnail of a media item.
Media::getThumbnailWidth in core/modules/media/src/Entity/Media.php
Gets the width of the thumbnail of a media item.
Media::hasSourceFieldChanged in core/modules/media/src/Entity/Media.php
Determines if the source field value has changed.

... See full list

File

core/modules/media/src/Entity/Media.php, line 142

Class

Media
Defines the media entity class.

Namespace

Drupal\media\Entity

Code

public function getSource() {
    return $this->bundle->entity
        ->getSource();
}

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