protected function GetImageSize::doGetMetadata in File metadata manager 8
Same name and namespace in other branches
- 8.2 src/Plugin/FileMetadata/GetImageSize.php \Drupal\file_mdm\Plugin\FileMetadata\GetImageSize::doGetMetadata()
Gets a metadata element.
Parameters
mixed|null $key: A key to determine the metadata element to be returned. If NULL, the entire metadata will be returned.
Return value
mixed|null The value of the element specified by $key. If $key is NULL, the entire metadata. If no metadata is available, return NULL.
Overrides FileMetadataPluginBase::doGetMetadata
File
- src/
Plugin/ FileMetadata/ GetImageSize.php, line 59
Class
- GetImageSize
- FileMetadata plugin for getimagesize.
Namespace
Drupal\file_mdm\Plugin\FileMetadataCode
protected function doGetMetadata($key = NULL) {
if ($key === NULL) {
return $this->metadata;
}
else {
$this
->validateKey($key, __FUNCTION__);
return isset($this->metadata[$key]) ? $this->metadata[$key] : NULL;
}
}