src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php
protected function &GetNextItem()
    {
        if (is_null($this->oNextItem)) {
            $oActiveItem = &$this->GetActiveItem();
            $oItemList = &$this->GetHotspotConfig()->GetFieldPkgImageHotspotItemList();
            if ($oItemList->Length() < 2) {
                $retValue = null; // write to variable to satisfy strict mode
                return $retValue;
            }
            $oItemList->GoToStart();
            while (is_null($this->oNextItem) && ($oItem = $oItemList->Next())) {
                if ($oItem->IsSameAs($oActiveItem)) {
                    $this->oNextItem = $oItemList->Next();
                    if (false == $this->oNextItem) {
                        $oItemList->GoToStart();
                        $this->oNextItem = $oItemList->Next();
                    }
                }
            }
            if (!is_null($this->oNextItem) && $this->oNextItem->IsSameAs($oActiveItem)) {
                $this->oNextItem = null;
            }
        }

        return $this->oNextItem;
    }
protected function &GetNextItem()
    {
        if (is_null($this->oNextItem)) {
            $oActiveItem = &$this->GetActiveItem();
            $oItemList = &$this->GetHotspotConfig()->GetFieldPkgImageHotspotItemList();
            if ($oItemList->Length() < 2) {
                $retValue = null; // write to variable to satisfy strict mode
                return $retValue;
            }
            $oItemList->GoToStart();
            while (is_null($this->oNextItem) && ($oItem = $oItemList->Next())) {
                if ($oItem->IsSameAs($oActiveItem)) {
                    $this->oNextItem = $oItemList->Next();
                    if (false == $this->oNextItem) {
                        $oItemList->GoToStart();
                        $this->oNextItem = $oItemList->Next();
                    }
                }
            }
            if (!is_null($this->oNextItem) && $this->oNextItem->IsSameAs($oActiveItem)) {
                $this->oNextItem = null;
            }
        }

        return $this->oNextItem;
    }
protected function & GetNextItem ( ) { if ( is_null ( $ this -> oNextItem ) ) { $ oActiveItem = & $ this -> GetActiveItem ( ) ; $ oItemList = & $ this -> GetHotspotConfig ( ) -> GetFieldPkgImageHotspotItemList ( ) ; if ( $ oItemList -> Length ( ) < 2 ) { $ retValue = null ; // write to variable to satisfy strict mode return $ retValue ; } $ oItemList -> GoToStart ( ) ; while ( is_null ( $ this -> oNextItem ) && ( $ oItem = $ oItemList -> Next ( ) ) ) { if ( $ oItem -> IsSameAs ( $ oActiveItem ) ) { $ this -> oNextItem = $ oItemList -> Next ( ) ; if ( false == $ this -> oNextItem ) { $ oItemList -> GoToStart ( ) ; $ this -> oNextItem = $ oItemList -> Next ( ) ; } } } if ( ! is_null ( $ this -> oNextItem ) && $ this -> oNextItem -> IsSameAs ( $ oActiveItem ) ) { $ this -> oNextItem = null ; } } return $ this -> oNextItem ; }
return the hotspot following the current active spot. if the active spot is the
last spot, then we will return the first step.

@return TdbPkgImageHotspotItem|null
return the hotspot following the current active spot . if the active spot is the last spot then we will return the first step .