Back to PhocaGalleryImageFront class

Method displayCategoriesCVImageOrFolder

public static
displayCategoriesCVImageOrFolder
(mixed $linkThumbnailPath, mixed $imgCategoriesSizeCV)

Method displayCategoriesCVImageOrFolder - Source code

/*
 * IMAGE OR FOLDER - CATEGORIES VIEW IN CATEGORY VIEW- INTERNAL IMAGE
 * 0-small,1-medium,2-smallFolder,3-mediumFolder,4-smallShadow,5-mediumShadow,6-smallFolderShadow,7-mediumFolderShadow
 * We now the path from CATEGORY VIEW, we only change the path for CATEGORIES VIEW
 * If there is a folder icon - medium to small main, if image - phoca_thumb_m to phoca_thumb_s
 */
public static function displayCategoriesCVImageOrFolder($linkThumbnailPath, $imgCategoriesSizeCV)
{
    switch ((int) $imgCategoriesSizeCV) {
        case 0:
        case 2:
        case 4:
        case 6:
            $imageThumbnail = str_replace('medium', 'small-main', $linkThumbnailPath);
            $imageThumbnail = str_replace('phoca_thumb_m_', 'phoca_thumb_s_', $imageThumbnail);
            break;
        default:
            $imageThumbnail = str_replace('small-main', 'medium', $linkThumbnailPath);
            $imageThumbnail = str_replace('phoca_thumb_s_', 'phoca_thumb_m_', $imageThumbnail);
            break;
    }
    return $imageThumbnail;
}