/** * Generates the HTML that makes the thumbnails for fedora imported items * @param $imageIDElementID integer the id of the item type element for the fedora image ID * @param $item Item the fedora imported item for which a thumbnail sized image is needed * @return string HTML img tag containing the link to this fedora item's thumbnail, or either the alt text or an empty string if the image ID can't be found */ public static function getThumbnailHTML($imageIDElementID, $item) { //find the fedoraImageID (used in the image server URL) by finding the text element that has the //same element type ID as the fedoraImageID element type foreach ($item->ElementTexts as $elementText) { if ($elementText->element_id == $imageIDElementID) { if ($fedoraImageID = $elementText->text) { return str_replace('altText', FedoraConnectorPlugin::getAltText($item), str_replace('fedoraImageID', $fedoraImageID, get_option('digitalCaseThumbnailURL'))); } } } return ''; }