src/ShopBundle/mappers/order/TPkgShopMapper_OrderArticleList.class.php
protected function getArticleImageId(TdbShopArticle $oArticle, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled, $sImageSizeName = 'basket')
    {
        $sImageId = '';
        if (null !== $oArticle) {
            $oImage = $oArticle->GetImagePreviewObject($sImageSizeName);
            if (null !== $oImage) {
                $sImageId = $oImage->fieldCmsMediaId;
            }
            if (empty($sImageId) || (is_numeric($sImageId) && $sImageId < 100)) {
                $oPrimaryImage = $oArticle->GetPrimaryImage();
                if (null !== $oPrimaryImage) {
                    $oImage = $oPrimaryImage->GetImage(0, 'images', true);
                    if (null !== $oImage) {
                        $sImageId = $oImage->id;
                        if ($bCachingEnabled) {
                            $oCacheTriggerManager->addTrigger('cms_media', $sImageId);
                        }
                    }
                }
            } else {
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger('cms_media', $sImageId);
                }
            }
        }

        return $sImageId;
    }
protected function getArticleImageId(TdbShopArticle $oArticle, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled, $sImageSizeName = 'basket')
    {
        $sImageId = '';
        if (null !== $oArticle) {
            $oImage = $oArticle->GetImagePreviewObject($sImageSizeName);
            if (null !== $oImage) {
                $sImageId = $oImage->fieldCmsMediaId;
            }
            if (empty($sImageId) || (is_numeric($sImageId) && $sImageId < 100)) {
                $oPrimaryImage = $oArticle->GetPrimaryImage();
                if (null !== $oPrimaryImage) {
                    $oImage = $oPrimaryImage->GetImage(0, 'images', true);
                    if (null !== $oImage) {
                        $sImageId = $oImage->id;
                        if ($bCachingEnabled) {
                            $oCacheTriggerManager->addTrigger('cms_media', $sImageId);
                        }
                    }
                }
            } else {
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger('cms_media', $sImageId);
                }
            }
        }

        return $sImageId;
    }
protected function getArticleImageId ( TdbShopArticle $ oArticle , IMapperCacheTriggerRestricted $ oCacheTriggerManager , $ bCachingEnabled , $ sImageSizeName = 'basket' ) { $ sImageId = '' ; if ( null !== $ oArticle ) { $ oImage = $ oArticle -> GetImagePreviewObject ( $ sImageSizeName ) ; if ( null !== $ oImage ) { $ sImageId = $ oImage -> fieldCmsMediaId ; } if ( empty ( $ sImageId ) || ( is_numeric ( $ sImageId ) && $ sImageId < 100 ) ) { $ oPrimaryImage = $ oArticle -> GetPrimaryImage ( ) ; if ( null !== $ oPrimaryImage ) { $ oImage = $ oPrimaryImage -> GetImage ( 0 , 'images' , true ) ; if ( null !== $ oImage ) { $ sImageId = $ oImage -> id ; if ( $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( 'cms_media' , $ sImageId ) ; } } } } else { if ( $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( 'cms_media' , $ sImageId ) ; } } } return $ sImageId ; }
get the image id of connected article for given order item in the dimensions defined by the given image size identifier.

@param TdbShopArticle                $oArticle
@param IMapperCacheTriggerRestricted $oCacheTriggerManager
@param bool                          $bCachingEnabled
@param string                        $sImageSizeName

@return string empty string or image id
get the image id of connected article for given order item in the dimensions defined by the given image size identifier .