public static function createImageAndBuildHtml($imgageProperties, $config, $screenres, $param = '') { if ($imgageProperties) { $imgProperties = new ImageProperties($imgageProperties, $config); $thumb_width = $config->getThumbnailMaxWidth(); $thumb_heigth = $config->getThumbnailMaxHeight(); $full_width = $config->getFullsizeMaxWidth(); $full_height = $config->getFullsizeMaxHeight(); $thumbSizeProperties = new ImageDisplayProperties($thumb_width, $thumb_heigth, $imgProperties->getAbsoluteFileName()); $imageSizeProperties = new ImageDisplayProperties($full_width, $full_height, $imgProperties->getAbsoluteFileName(), $screenres); $thumbnailCreator = new ThumbnailCreator($config); $mosthumbProperties = $thumbnailCreator->createThumbnailImage($thumbSizeProperties); $mosimageProperties = $thumbnailCreator->createResizedImage($imageSizeProperties); if (!$mosthumbProperties || !$mosimageProperties) { return ''; } $lightbox = LightboxHelper::getInstance($config->getLightboxType()); $images = self::buildHtmlForImage($lightbox, $mosthumbProperties, $mosimageProperties, $imgProperties, $config, $param); return $images; } else { return ''; } }
private function addLightBoxStyleSheetAndScript($config) { $lightbox = LightboxHelper::getInstance($config->getLightboxType()); $lightbox->addScriptAndCssToDocument(); }