src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php
public function GetPreviousItem()
    {
        $oPreviousItem = &$this->GetFromInternalCache('oPreviousItem');
        if (is_null($oPreviousItem)) {
            $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId);
            $oItemList->bAllowItemCache = true;
            if ($oItemList->Length() > 1) {
                $oPreviousItem = null;
                $oItemList->GoToEnd();
                while (is_null($oPreviousItem) && ($oTmpItem = $oItemList->Previous())) {
                    if ($oTmpItem->IsSameAs($this)) {
                        $oPreviousItem = $oItemList->Previous();
                    }
                }
                if (!$oPreviousItem) {
                    $oItemList->GoToEnd();
                    $oPreviousItem = $oItemList->Previous();
                    if (!$oPreviousItem || $oPreviousItem->IsSameAs($this)) {
                        $oPreviousItem = false;
                    }
                }
            }
            $this->SetInternalCache('oPreviousItem', $oPreviousItem);
        }

        return $oPreviousItem;
    }
public function GetPreviousItem()
    {
        $oPreviousItem = &$this->GetFromInternalCache('oPreviousItem');
        if (is_null($oPreviousItem)) {
            $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId);
            $oItemList->bAllowItemCache = true;
            if ($oItemList->Length() > 1) {
                $oPreviousItem = null;
                $oItemList->GoToEnd();
                while (is_null($oPreviousItem) && ($oTmpItem = $oItemList->Previous())) {
                    if ($oTmpItem->IsSameAs($this)) {
                        $oPreviousItem = $oItemList->Previous();
                    }
                }
                if (!$oPreviousItem) {
                    $oItemList->GoToEnd();
                    $oPreviousItem = $oItemList->Previous();
                    if (!$oPreviousItem || $oPreviousItem->IsSameAs($this)) {
                        $oPreviousItem = false;
                    }
                }
            }
            $this->SetInternalCache('oPreviousItem', $oPreviousItem);
        }

        return $oPreviousItem;
    }
public function GetPreviousItem ( ) { $ oPreviousItem = & $ this -> GetFromInternalCache ( 'oPreviousItem' ) ; if ( is_null ( $ oPreviousItem ) ) { $ oItemList = TdbPkgImageHotspotItemList :: GetListForPkgImageHotspotId ( $ this -> fieldPkgImageHotspotId ) ; $ oItemList -> bAllowItemCache = true ; if ( $ oItemList -> Length ( ) > 1 ) { $ oPreviousItem = null ; $ oItemList -> GoToEnd ( ) ; while ( is_null ( $ oPreviousItem ) && ( $ oTmpItem = $ oItemList -> Previous ( ) ) ) { if ( $ oTmpItem -> IsSameAs ( $ this ) ) { $ oPreviousItem = $ oItemList -> Previous ( ) ; } } if ( ! $ oPreviousItem ) { $ oItemList -> GoToEnd ( ) ; $ oPreviousItem = $ oItemList -> Previous ( ) ; if ( ! $ oPreviousItem || $ oPreviousItem -> IsSameAs ( $ this ) ) { $ oPreviousItem = false ; } } } $ this -> SetInternalCache ( 'oPreviousItem' , $ oPreviousItem ) ; } return $ oPreviousItem ; }
returns the item before this item
if the current item is the first in line, the method will return the last item. returns false if
no previous item exists.

@return TdbPkgImageHotspotItem
returns the item before this item if the current item is the first in line the method will return the last item . returns false if no previous item exists .