public function ExifTagMapper::getSupportedKeys in File metadata manager 8.2
Same name and namespace in other branches
- 8 file_mdm_exif/src/ExifTagMapper.php \Drupal\file_mdm_exif\ExifTagMapper::getSupportedKeys()
Returns a list of default metadata 'keys' supported.
Parameters
array $options: (optional) If specified, restricts the results returned. By default, all the available EXIF IFD/TAG combinations for any IFD are returned. If $options contains ['ifds' => TRUE], the supported IFDs are returned. If $options contains ['ifd' => $value], the IFD/TAG combinations supported by the IFD specified by $value are returned.
Return value
array A simple array. When returning a list of supported IFDs, each array element is a simple array with: 0 => the default string identifier of the IFD. 1 => the integer identifier of the IFD. When returning a list of supported IFD/TAGs, each array element is a simple array with: 0 => the string identifier of the IFD. 1 => the string identifier of the TAG.
Overrides ExifTagMapperInterface::getSupportedKeys
File
- file_mdm_exif/
src/ ExifTagMapper.php, line 135
Class
- ExifTagMapper
- Provides a mapping service for EXIF ifds and tags.
Namespace
Drupal\file_mdm_exifCode
public function getSupportedKeys(array $options = NULL) {
if (isset($options['ifds'])) {
return $this
->getSupportedIfdsMap();
}
elseif (isset($options['ifd'])) {
return array_filter($this
->getSupportedKeysMap(), function ($a) use ($options) {
return strtolower($options['ifd']) === strtolower($a[0]);
});
}
else {
return $this
->getSupportedKeysMap();
}
}