You are here

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

Gets the existing file ID from the given Media entity.

Return value

int|false The existing file ID or FALSE if one was not found.

1 call to MediaEntityHelper::getExistingFileId()
MediaEntityHelper::getExistingFile in src/MediaEntityHelper.php
Attempts to load an existing file entity from the given media entity.

File

src/MediaEntityHelper.php, line 133

Class

MediaEntityHelper
Class MediaEntityHelper.

Namespace

Drupal\media_acquiadam

Code

public function getExistingFileId() {
  return $this
    ->getFieldPropertyValue($this
    ->getAssetFileField()) ?? FALSE;
}