src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php
public function WriteReview()
    {
        //validate user input...
        $oGlobal = TGlobal::instance();
        $aUserData = array();
        if ($this->AllowWriteReview()) {
            $aUserData = $this->GetReviewWriteData();
            $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
            if ($this->ValidateWriteReviewData($aUserData)) {
                $oArticle = $this->GetArticleToReview();
                $oReviewItem = $this->CreateReview($aUserData, $oArticle);
                $oArticle->UpdateStatsReviews();
                $oReviewItem->SendNewReviewNotification();
                $oMsgManager = TCMSMessageManager::GetInstance();
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-SUBMITTED', $aUserData);
                $this->RedirectToItemPage();
            }
        }
        $this->RedirectToItemPage(null, array(TdbShopArticleReview::INPUT_BASE_NAME => $aUserData), true);
    }
public function WriteReview()
    {
        //validate user input...
        $oGlobal = TGlobal::instance();
        $aUserData = array();
        if ($this->AllowWriteReview()) {
            $aUserData = $this->GetReviewWriteData();
            $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
            if ($this->ValidateWriteReviewData($aUserData)) {
                $oArticle = $this->GetArticleToReview();
                $oReviewItem = $this->CreateReview($aUserData, $oArticle);
                $oArticle->UpdateStatsReviews();
                $oReviewItem->SendNewReviewNotification();
                $oMsgManager = TCMSMessageManager::GetInstance();
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-SUBMITTED', $aUserData);
                $this->RedirectToItemPage();
            }
        }
        $this->RedirectToItemPage(null, array(TdbShopArticleReview::INPUT_BASE_NAME => $aUserData), true);
    }
public function WriteReview ( ) { //validate user input... $ oGlobal = TGlobal :: instance ( ) ; $ aUserData = array ( ) ; if ( $ this -> AllowWriteReview ( ) ) { $ aUserData = $ this -> GetReviewWriteData ( ) ; $ oGlobal -> GetuserData ( TdbShopArticleReview :: INPUT_BASE_NAME ) ; if ( $ this -> ValidateWriteReviewData ( $ aUserData ) ) { $ oArticle = $ this -> GetArticleToReview ( ) ; $ oReviewItem = $ this -> CreateReview ( $ aUserData , $ oArticle ) ; $ oArticle -> UpdateStatsReviews ( ) ; $ oReviewItem -> SendNewReviewNotification ( ) ; $ oMsgManager = TCMSMessageManager :: GetInstance ( ) ; $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-SUBMITTED' , $ aUserData ) ; $ this -> RedirectToItemPage ( ) ; } } $ this -> RedirectToItemPage ( null , array ( TdbShopArticleReview :: INPUT_BASE_NAME => $ aUserData ) , true ) ; }
Writes a review.
Writes a review .