You are here

public function Media::getSource in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getSource()

Returns the media source.

Return value

\Drupal\media\MediaSourceInterface The media source.

Overrides MediaInterface::getSource

5 calls to Media::getSource()
Media::getName in core/modules/media/src/Entity/Media.php
Gets the media item name.
Media::getThumbnailUri in core/modules/media/src/Entity/Media.php
Gets the URI for the thumbnail of a media item.
Media::prepareSave in core/modules/media/src/Entity/Media.php
Sets the media entity's field values from the source's metadata.
Media::updateThumbnail in core/modules/media/src/Entity/Media.php
Update the thumbnail for the media item.
Media::validate in core/modules/media/src/Entity/Media.php
Validates the currently set values.

File

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

Class

Media
Defines the media entity class.

Namespace

Drupal\media\Entity

Code

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