You are here

public function SimpleExifToolFacade::getMetadataFields in Exif 8.2

Same name and namespace in other branches
  1. 8 src/SimpleExifToolFacade.php \Drupal\exif\SimpleExifToolFacade::getMetadataFields()
  2. 7 SimpleExiftoolFacade.php \Drupal\exif\SimpleExifToolFacade::getMetadataFields()

Return drupal fields related to this extension.

Going through all the fields that have been created for a given node type and try to figure out which match the naming convention -> so that we know which exif information we have to read.

Naming convention are: field_exif_xxx (xxx would be the name of the exif tag to read.

Parameters

array $arCckFields: CCK fields.

Return value

array List of exif tags to read for this image

Overrides ExifInterface::getMetadataFields

File

src/SimpleExifToolFacade.php, line 60

Class

SimpleExifToolFacade
Class SimpleExifToolFacade.

Namespace

Drupal\exif

Code

public function getMetadataFields(array $arCckFields = []) {
  foreach ($arCckFields as $drupal_field => $metadata_settings) {
    $metadata_field = $metadata_settings['metadata_field'];
    $ar = explode("_", $metadata_field);
    if (isset($ar[0])) {
      $section = $ar[0];
      unset($ar[0]);
      $arCckFields[$drupal_field]['metadata_field'] = [
        'section' => $section,
        'tag' => implode("_", $ar),
      ];
    }
  }
  return $arCckFields;
}