Back to PhocaGalleryImageFront class

Method displayCategoriesCVExtImgOrFolder

public static
displayCategoriesCVExtImgOrFolder
(mixed $linkThumbnailPathM, mixed $linkThumbnailPathS, mixed $linkThumbnailPath, mixed $imgCategoriesSizeCV)

Method displayCategoriesCVExtImgOrFolder - Source code

/*
 * IMAGE OR FOLDER - CATEGORIES VIEW IN CATEGORY VIEW- EXTERNAL IMAGE
 * 0-small,1-medium,2-smallFolder,3-mediumFolder,4-smallShadow,5-mediumShadow,6-smallFolderShadow,7-mediumFolderShadow
 */
public static function displayCategoriesCVExtImgOrFolder($linkThumbnailPathM, $linkThumbnailPathS, $linkThumbnailPath, $imgCategoriesSizeCV)
{
    switch ((int) $imgCategoriesSizeCV) {
        case 0:
        case 2:
        case 4:
        case 6:
            if ($linkThumbnailPathS != '') {
                $imageThumbnail = $linkThumbnailPathS;
            } else {
                $imageThumbnail = str_replace('medium', 'small-main', $linkThumbnailPath);
                $imageThumbnail = str_replace('phoca_thumb_m_', 'phoca_thumb_s_', $imageThumbnail);
            }
            break;
        default:
            if ($linkThumbnailPathM != '') {
                $imageThumbnail = $linkThumbnailPathM;
            } else {
                $imageThumbnail = str_replace('small-main', 'medium', $linkThumbnailPath);
                $imageThumbnail = str_replace('phoca_thumb_s_', 'phoca_thumb_m_', $imageThumbnail);
            }
            break;
    }
    return $imageThumbnail;
}