You are here

protected function Image::getExifField in Media entity image 8

Get exif field value.

Parameters

string $uri: The uri for the file that we are getting the Exif.

string $field: The name of the exif field.

Return value

string|bool The value for the requested field or FALSE if is not set.

1 call to Image::getExifField()
Image::getField in src/Plugin/MediaEntity/Type/Image.php
Gets a media-related field/value.

File

src/Plugin/MediaEntity/Type/Image.php, line 229

Class

Image
Provides media type plugin for Image.

Namespace

Drupal\media_entity_image\Plugin\MediaEntity\Type

Code

protected function getExifField($uri, $field) {
  if (empty($this->exif)) {
    $this->exif = $this
      ->getExif($uri);
  }
  return !empty($this->exif[$field]) ? $this->exif[$field] : FALSE;
}