You are here

public function MediaEntityHelper::getAsset in Media: Acquia DAM 8

Get the asset from a media entity.

Return value

bool|\cweagans\webdam\Entity\Asset The asset or FALSE on failure.

1 call to MediaEntityHelper::getAsset()
MediaEntityHelper::getFile in src/MediaEntityHelper.php
Returns an associated file or creates a new one.

File

src/MediaEntityHelper.php, line 163

Class

MediaEntityHelper
Class MediaEntityHelper.

Namespace

Drupal\media_acquiadam

Code

public function getAsset() {
  $assetId = $this
    ->getAssetId();
  return !empty($assetId) ? $this->acquiaDamClient
    ->getAsset($assetId, TRUE) : FALSE;
}