src/ShopBundle/objects/db/TShopArticle.class.php
public function GetExportObject()
    {
        $oExportObject = new stdClass();
        $oExportObject->id = $this->id;
        foreach ($this as $sPropName => $sPropVal) {
            if ('field' == substr($sPropName, 0, 5)) {
                $oExportObject->{$sPropName} = $sPropVal;
            }
        }

        // Add additional infos that might be useful for an export

        // Images
        if (TGlobal::IsCMSMode()) {
            $oPortals = &TdbCmsPortalList::GetList();
            $oPortal = $oPortals->Current();
            $oShop = &TdbShop::GetInstance($oPortal->id);
        } else {
            $oShop = TdbShop::GetInstance();
        }
        $oImageSizeList = &TdbShopArticleImageSizeList::GetListForShopId($oShop->id);
        $oExportObject->aImages = array();
        $oImagePropertyList = &$this->GetFieldShopArticleImageList();
        $aImageData = array('original' => array(), 'thumb' => array());
        while ($oImageProperty = &$oImagePropertyList->Next()) {
            $oImage = $oImageProperty->GetImage(0, 'cms_media_id');
            if (null !== $oImage) {
                $aImageData['original'][] = $oImage->GetFullURL();
                $aImageData['originalLocal'][] = $oImage->GetFullLocalPath();
            }
        }
        $oImageSizeList->GoToStart();
        while ($oImageSize = &$oImageSizeList->Next()) {
            $oPreviewImageDescription = &$this->GetImagePreviewObject($oImageSize->fieldNameInternal);
            if (null !== $oPreviewImageDescription) {
                $oImage = $oPreviewImageDescription->GetImageThumbnailObject();
                $aImageData['thumb'][$oImageSize->fieldNameInternal] = $oImage->GetFullURL();
                $aImageData['thumbLocal'][$oImageSize->fieldNameInternal] = $oImage->GetFullLocalPath();
            }
        }
        $oExportObject->aImages = $aImageData;

        // DeepLink
        $oExportObject->fieldDeepLink = $this->GetDetailLink(true);

        // Author Lost
        $oContributorList = $this->GetContributorList(array('author'));
        $aContributorList = array();
        while ($oContributor = $oContributorList->Next()) {
            $aContributorList[] = $oContributor->GetName();
        }

        $oExportObject->aAuthors = $aContributorList;

        // Stock Message
        $oExportObject->oStockMessage = $this->GetFieldShopStockMessage();

        return $oExportObject;
    }
public function GetExportObject()
    {
        $oExportObject = new stdClass();
        $oExportObject->id = $this->id;
        foreach ($this as $sPropName => $sPropVal) {
            if ('field' == substr($sPropName, 0, 5)) {
                $oExportObject->{$sPropName} = $sPropVal;
            }
        }

        // Add additional infos that might be useful for an export

        // Images
        if (TGlobal::IsCMSMode()) {
            $oPortals = &TdbCmsPortalList::GetList();
            $oPortal = $oPortals->Current();
            $oShop = &TdbShop::GetInstance($oPortal->id);
        } else {
            $oShop = TdbShop::GetInstance();
        }
        $oImageSizeList = &TdbShopArticleImageSizeList::GetListForShopId($oShop->id);
        $oExportObject->aImages = array();
        $oImagePropertyList = &$this->GetFieldShopArticleImageList();
        $aImageData = array('original' => array(), 'thumb' => array());
        while ($oImageProperty = &$oImagePropertyList->Next()) {
            $oImage = $oImageProperty->GetImage(0, 'cms_media_id');
            if (null !== $oImage) {
                $aImageData['original'][] = $oImage->GetFullURL();
                $aImageData['originalLocal'][] = $oImage->GetFullLocalPath();
            }
        }
        $oImageSizeList->GoToStart();
        while ($oImageSize = &$oImageSizeList->Next()) {
            $oPreviewImageDescription = &$this->GetImagePreviewObject($oImageSize->fieldNameInternal);
            if (null !== $oPreviewImageDescription) {
                $oImage = $oPreviewImageDescription->GetImageThumbnailObject();
                $aImageData['thumb'][$oImageSize->fieldNameInternal] = $oImage->GetFullURL();
                $aImageData['thumbLocal'][$oImageSize->fieldNameInternal] = $oImage->GetFullLocalPath();
            }
        }
        $oExportObject->aImages = $aImageData;

        // DeepLink
        $oExportObject->fieldDeepLink = $this->GetDetailLink(true);

        // Author Lost
        $oContributorList = $this->GetContributorList(array('author'));
        $aContributorList = array();
        while ($oContributor = $oContributorList->Next()) {
            $aContributorList[] = $oContributor->GetName();
        }

        $oExportObject->aAuthors = $aContributorList;

        // Stock Message
        $oExportObject->oStockMessage = $this->GetFieldShopStockMessage();

        return $oExportObject;
    }
public function GetExportObject ( ) { $ oExportObject = new stdClass ( ) ; $ oExportObject -> id = $ this -> id ; foreach ( $ this as $ sPropName => $ sPropVal ) { if ( 'field' == substr ( $ sPropName , 0 , 5 ) ) { $ oExportObject -> { $ sPropName } = $ sPropVal ; } } // Add additional infos that might be useful for an export // Images if ( TGlobal :: IsCMSMode ( ) ) { $ oPortals = & TdbCmsPortalList :: GetList ( ) ; $ oPortal = $ oPortals -> Current ( ) ; $ oShop = & TdbShop :: GetInstance ( $ oPortal -> id ) ; } else { $ oShop = TdbShop :: GetInstance ( ) ; } $ oImageSizeList = & TdbShopArticleImageSizeList :: GetListForShopId ( $ oShop -> id ) ; $ oExportObject -> aImages = array ( ) ; $ oImagePropertyList = & $ this -> GetFieldShopArticleImageList ( ) ; $ aImageData = array ( 'original' => array ( ) , 'thumb' => array ( ) ) ; while ( $ oImageProperty = & $ oImagePropertyList -> Next ( ) ) { $ oImage = $ oImageProperty -> GetImage ( 0 , 'cms_media_id' ) ; if ( null !== $ oImage ) { $ aImageData [ 'original' ] [ ] = $ oImage -> GetFullURL ( ) ; $ aImageData [ 'originalLocal' ] [ ] = $ oImage -> GetFullLocalPath ( ) ; } } $ oImageSizeList -> GoToStart ( ) ; while ( $ oImageSize = & $ oImageSizeList -> Next ( ) ) { $ oPreviewImageDescription = & $ this -> GetImagePreviewObject ( $ oImageSize -> fieldNameInternal ) ; if ( null !== $ oPreviewImageDescription ) { $ oImage = $ oPreviewImageDescription -> GetImageThumbnailObject ( ) ; $ aImageData [ 'thumb' ] [ $ oImageSize -> fieldNameInternal ] = $ oImage -> GetFullURL ( ) ; $ aImageData [ 'thumbLocal' ] [ $ oImageSize -> fieldNameInternal ] = $ oImage -> GetFullLocalPath ( ) ; } } $ oExportObject -> aImages = $ aImageData ; // DeepLink $ oExportObject -> fieldDeepLink = $ this -> GetDetailLink ( true ) ; // Author Lost $ oContributorList = $ this -> GetContributorList ( array ( 'author' ) ) ; $ aContributorList = array ( ) ; while ( $ oContributor = $ oContributorList -> Next ( ) ) { $ aContributorList [ ] = $ oContributor -> GetName ( ) ; } $ oExportObject -> aAuthors = $ aContributorList ; // Stock Message $ oExportObject -> oStockMessage = $ this -> GetFieldShopStockMessage ( ) ; return $ oExportObject ; }
returns an article object with additional elements needed for exports and
interfaces like full URL image links, attachment links and so on.

When called from CMS BackEnd it WILL use the first portal/shop found

@return stdClass
returns an article object with additional elements needed for exports and interfaces like full URL image links attachment links and so on .