Display metadata on file page
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -198,7 +198,7 @@ class GlModelHandler extends ImageHandler {
|
||||
}
|
||||
$newMeta['glmv-metadata'] = self::GLMV_VERSION;
|
||||
$metaHandler = new BitmapMetadataHandler;
|
||||
$metaHandler->addMetadata($newMeta,'exif');
|
||||
$metaHandler->addMetadata($newMeta,'native');
|
||||
return array(
|
||||
'width' => 600,
|
||||
'height' => 800,
|
||||
@@ -225,6 +225,26 @@ class GlModelHandler extends ImageHandler {
|
||||
return self::METADATA_GOOD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array structure that the UI will format this into a table where the visible
|
||||
* fields are always visible, and the collapsed fields are optionally visible.
|
||||
*
|
||||
* The function should return false if there is no metadata to display.
|
||||
*
|
||||
* @param File $image
|
||||
* @param bool|IContextSource $context Context to use (optional)
|
||||
* @return bool|array
|
||||
*/
|
||||
public function formatMetadata( $image, $context = false ) {
|
||||
$glmvMetadata = $image->getMetadataArray();
|
||||
|
||||
if (!count( $glmvMetadata ) ) {
|
||||
return false;
|
||||
} else {
|
||||
return $this->formatMetadataHelper( $glmvMetadata, $context );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Small helper function to display information on the browser console
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user