Same name and namespace in other branches
  1. 7.x-1.x ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::getFieldKeys() 1 comment
  2. 8.x-2.x src/ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::getFieldKeys() 1 comment

List of known metadata keys.

Metadata combine EXIF and IPTC keys.

Return value

array Metadata Keys.

Overrides ExifInterface::getFieldKeys

File

src/ExifPHPExtension.php, line 792

Class

ExifPHPExtension
Class ExifPHPExtension Parser implementation base d on PHP Exif extension.

Namespace

Drupal\exif

Code

public function getFieldKeys() {
    $exif_keys_temp = $this->getHumanReadableExifKeys();
    $exif_keys = [];
    foreach ($exif_keys_temp as $value) {
        $exif_keys[$value] = $value;
    }
    $iptc_keys_temp = array_values($this->getHumanReadableIptcDescriptions());
    $iptc_keys = [];
    foreach ($iptc_keys_temp as $value) {
        $current_value = "iptc_" . $value;
        $iptc_keys[$current_value] = $current_value;
    }
    $fields = array_merge($exif_keys, $iptc_keys);
    ksort($fields);
    return $fields;
}