Same name and namespace in other branches
- 8.x-1.x src/SimpleExifToolFacade.php \Drupal\exif\SimpleExifToolFacade::getMetadataFields() 1 comment
- 8.x-2.x src/SimpleExifToolFacade.php \Drupal\exif\SimpleExifToolFacade::getMetadataFields() 1 comment
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 $fields: The fields to process.
Return value
array A list of exif tags to read for this image.
Overrides ExifInterface::getMetadataFields
File
-
./
SimpleExiftoolFacade.php, line 44
Class
- SimpleExifToolFacade
- Helper class to handle the whole data processing of EXIF with exiftool.
Namespace
Drupal\exifCode
public function getMetadataFields(array $fields = array()) {
foreach ($fields 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]);
$fields[$drupal_field]['metadata_field'] = array(
'section' => $section,
'tag' => implode('_', $ar),
);
}
}
return $fields;
}