class ShadowPageLayouts_View_Helper_ExhibitAttachment extends Zend_View_Helper_Abstract
{
/**
* Return the markup for displaying an exhibit attachment.
*
* @param ExhibitBlockAttachment $attachment
* @param array $fileOptions Array of options for file_markup
* @param array $linkProps Array of options for exhibit_builder_link_to_exhibit_item
* @param boolean $forceImage Whether to display the attachment as an image
* always Defaults to false.
* @return string
*/
public function exhibitAttachment($attachment, $fileOptions = array(), $linkProps = array(), $forceImage = false)
{
$item = $attachment->getItem();
$file = $attachment->getFile();
if ($file) {
if (!isset($fileOptions['imgAttributes']['alt'])) {
$fileOptions['imgAttributes']['alt'] = metadata($item, array('Dublin Core', 'Title'));
}
if ($forceImage) {
$imageSize = isset($fileOptions['imageSize'])
? $fileOptions['imageSize']
: 'square_thumbnail';
$image = file_image($imageSize, $fileOptions['imgAttributes'], $file);
$html = exhibit_builder_link_to_exhibit_item_file($image, $linkProps, $item);
} else {
if (!isset($fileOptions['linkAttributes']['href'])) {
$fileOptions['linkAttributes']['href'] = exhibit_builder_exhibit_item_uri($item);
}
$html = file_markup($file, $fileOptions, null);
}
} else if($item) {
$html = exhibit_builder_link_to_exhibit_item_file(null, $linkProps, $item);
}
// Don't show a caption if we couldn't show the Item or File at all
if (isset($html)) {
$html .= $this->view->exhibitAttachmentCaption($attachment);
} else {
$html = '';
}
return apply_filters('exhibit_attachment_markup', $html,
compact('attachment', 'fileOptions', 'linkProps', 'forceImage')
);
}
}
?>
Please follow the link below to see the timemap for the Bioart Collection.
Bioart collection
Please follow the link below to see the timemap for the Animals in Art Collection.
Animals in Art
Please follow the link below to see the timemap for the Plants in Art Collection.
Plants in Art
Marc Quinn, Siren, 2010
© Marc Quinn. Photography: Prudence Cuming Associates, courtesy of Marc Quinn Studio
Please follow the link below to see the timemap for the Miscellaneous Collection.
Miscellaneous