src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
public function RemoveFromNoticeList($aArticleIdsToMove = null, $sMessageHandler = null, $bIsInteralCall = false, $bIsAjaxCall = false)
    {
        $oGlobal = TGlobal::instance();
        $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
        if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) {
            $aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME];
            if (!is_array($aArticleIdsToMove)) {
                $aArticleIdsToMove = array($aArticleIdsToMove);
            }
        }

        if (is_null($sMessageHandler) && array_key_exists(self::URL_MESSAGE_CONSUMER_NAME, $aRequestData)) {
            $sMessageHandler = $aRequestData[self::URL_MESSAGE_CONSUMER_NAME];
            if (empty($sMessageHandler)) {
                $sMessageHandler = null;
            }
        }
        if (is_null($sMessageHandler)) {
            $sMessageHandler = self::MSG_CONSUMER_NAME;
        }
        $oMessageManager = TCMSMessageManager::GetInstance();
        $oUser = TdbDataExtranetUser::GetInstance();
        foreach ($aArticleIdsToMove as $iArticleId) {
            $oUser->RemoveArticleFromNoticeList($iArticleId);
            $oArticle = TdbShopArticle::GetNewInstance();
            /** @var $oArticle TdbShopArticle */
            $oArticle->Load($iArticleId);
            $aMessageData = array('sArticleLinkStart' => '<a href="'.TGlobal::OutHTML($oArticle->GetDetailLink()).'">', 'sArticleLinkEnd' => '</a>', 'sArticleName' => $oArticle->GetName());
            if (!$bIsAjaxCall) {
                $oMessageManager->AddMessage($sMessageHandler, 'NOTICE-LIST-REMOVED-ITEM', $aMessageData);
            }
        }

        $iRedirectNodeId = null;
        if (array_key_exists(self::URL_REDIRECT_NODE_ID_NAME, $aRequestData)) {
            $iRedirectNodeId = $aRequestData[self::URL_REDIRECT_NODE_ID_NAME];
            if (empty($iRedirectNodeId)) {
                $iRedirectNodeId = null;
            }
        }

        if (!$bIsInteralCall) {
            if ($bIsAjaxCall) {
                return array('message' => '');
            } else {
                $this->RedirectAfterEvent($iRedirectNodeId);
            }
        }
    }
public function RemoveFromNoticeList($aArticleIdsToMove = null, $sMessageHandler = null, $bIsInteralCall = false, $bIsAjaxCall = false)
    {
        $oGlobal = TGlobal::instance();
        $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
        if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) {
            $aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME];
            if (!is_array($aArticleIdsToMove)) {
                $aArticleIdsToMove = array($aArticleIdsToMove);
            }
        }

        if (is_null($sMessageHandler) && array_key_exists(self::URL_MESSAGE_CONSUMER_NAME, $aRequestData)) {
            $sMessageHandler = $aRequestData[self::URL_MESSAGE_CONSUMER_NAME];
            if (empty($sMessageHandler)) {
                $sMessageHandler = null;
            }
        }
        if (is_null($sMessageHandler)) {
            $sMessageHandler = self::MSG_CONSUMER_NAME;
        }
        $oMessageManager = TCMSMessageManager::GetInstance();
        $oUser = TdbDataExtranetUser::GetInstance();
        foreach ($aArticleIdsToMove as $iArticleId) {
            $oUser->RemoveArticleFromNoticeList($iArticleId);
            $oArticle = TdbShopArticle::GetNewInstance();
            /** @var $oArticle TdbShopArticle */
            $oArticle->Load($iArticleId);
            $aMessageData = array('sArticleLinkStart' => '<a href="'.TGlobal::OutHTML($oArticle->GetDetailLink()).'">', 'sArticleLinkEnd' => '</a>', 'sArticleName' => $oArticle->GetName());
            if (!$bIsAjaxCall) {
                $oMessageManager->AddMessage($sMessageHandler, 'NOTICE-LIST-REMOVED-ITEM', $aMessageData);
            }
        }

        $iRedirectNodeId = null;
        if (array_key_exists(self::URL_REDIRECT_NODE_ID_NAME, $aRequestData)) {
            $iRedirectNodeId = $aRequestData[self::URL_REDIRECT_NODE_ID_NAME];
            if (empty($iRedirectNodeId)) {
                $iRedirectNodeId = null;
            }
        }

        if (!$bIsInteralCall) {
            if ($bIsAjaxCall) {
                return array('message' => '');
            } else {
                $this->RedirectAfterEvent($iRedirectNodeId);
            }
        }
    }
public function RemoveFromNoticeList ( $ aArticleIdsToMove = null , $ sMessageHandler = null , $ bIsInteralCall = false , $ bIsAjaxCall = false ) { $ oGlobal = TGlobal :: instance ( ) ; $ aRequestData = $ oGlobal -> GetUserData ( self :: URL_REQUEST_PARAMETER ) ; if ( is_null ( $ aArticleIdsToMove ) && array_key_exists ( self :: URL_ITEM_ID_NAME , $ aRequestData ) ) { $ aArticleIdsToMove = $ aRequestData [ self :: URL_ITEM_ID_NAME ] ; if ( ! is_array ( $ aArticleIdsToMove ) ) { $ aArticleIdsToMove = array ( $ aArticleIdsToMove ) ; } } if ( is_null ( $ sMessageHandler ) && array_key_exists ( self :: URL_MESSAGE_CONSUMER_NAME , $ aRequestData ) ) { $ sMessageHandler = $ aRequestData [ self :: URL_MESSAGE_CONSUMER_NAME ] ; if ( empty ( $ sMessageHandler ) ) { $ sMessageHandler = null ; } } if ( is_null ( $ sMessageHandler ) ) { $ sMessageHandler = self :: MSG_CONSUMER_NAME ; } $ oMessageManager = TCMSMessageManager :: GetInstance ( ) ; $ oUser = TdbDataExtranetUser :: GetInstance ( ) ; foreach ( $ aArticleIdsToMove as $ iArticleId ) { $ oUser -> RemoveArticleFromNoticeList ( $ iArticleId ) ; $ oArticle = TdbShopArticle :: GetNewInstance ( ) ; /** @var $oArticle TdbShopArticle */ $ oArticle -> Load ( $ iArticleId ) ; $ aMessageData = array ( 'sArticleLinkStart' => '<a href="' . TGlobal :: OutHTML ( $ oArticle -> GetDetailLink ( ) ) . '">' , 'sArticleLinkEnd' => '</a>' , 'sArticleName' => $ oArticle -> GetName ( ) ) ; if ( ! $ bIsAjaxCall ) { $ oMessageManager -> AddMessage ( $ sMessageHandler , 'NOTICE-LIST-REMOVED-ITEM' , $ aMessageData ) ; } } $ iRedirectNodeId = null ; if ( array_key_exists ( self :: URL_REDIRECT_NODE_ID_NAME , $ aRequestData ) ) { $ iRedirectNodeId = $ aRequestData [ self :: URL_REDIRECT_NODE_ID_NAME ] ; if ( empty ( $ iRedirectNodeId ) ) { $ iRedirectNodeId = null ; } } if ( ! $ bIsInteralCall ) { if ( $ bIsAjaxCall ) { return array ( 'message' => '' ) ; } else { $ this -> RedirectAfterEvent ( $ iRedirectNodeId ) ; } } }
remove item from notice list.

@param array  $aArticleIdsToMove
@param string $sMessageHandler
@param bool   $bIsInteralCall
remove item from notice list .