src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php
protected function GetReviewsForArticle($oActiveArticle)
    {
        $oModuleConfiguration = $this->GetModuleConfiguration();
        if ($oActiveArticle->IsVariant()) {
            $oActiveArticle = $oActiveArticle->GetFieldVariantParent();
        }
        $oActiveCategory = TdbShop::GetActiveCategory();

        $this->data['oActiveCategory'] = $oActiveCategory;
        $this->data['oActiveArticle'] = $oActiveArticle;
        if ($oModuleConfiguration->fieldAllowRateReview) {
            $oReviewList = TdbShopArticleReviewList::GetReviewsForArticleSortedByRate($oActiveArticle->id);
        } else {
            $oReviewList = TdbShopArticleReviewList::GetListForShopArticleId($oActiveArticle->id);
        }
        $oReviewList->AddFilterString("`shop_article_review`.`publish`='1'");

        return $oReviewList;
    }
protected function GetReviewsForArticle($oActiveArticle)
    {
        $oModuleConfiguration = $this->GetModuleConfiguration();
        if ($oActiveArticle->IsVariant()) {
            $oActiveArticle = $oActiveArticle->GetFieldVariantParent();
        }
        $oActiveCategory = TdbShop::GetActiveCategory();

        $this->data['oActiveCategory'] = $oActiveCategory;
        $this->data['oActiveArticle'] = $oActiveArticle;
        if ($oModuleConfiguration->fieldAllowRateReview) {
            $oReviewList = TdbShopArticleReviewList::GetReviewsForArticleSortedByRate($oActiveArticle->id);
        } else {
            $oReviewList = TdbShopArticleReviewList::GetListForShopArticleId($oActiveArticle->id);
        }
        $oReviewList->AddFilterString("`shop_article_review`.`publish`='1'");

        return $oReviewList;
    }
protected function GetReviewsForArticle ( $ oActiveArticle ) { $ oModuleConfiguration = $ this -> GetModuleConfiguration ( ) ; if ( $ oActiveArticle -> IsVariant ( ) ) { $ oActiveArticle = $ oActiveArticle -> GetFieldVariantParent ( ) ; } $ oActiveCategory = TdbShop :: GetActiveCategory ( ) ; $ this -> data [ 'oActiveCategory' ] = $ oActiveCategory ; $ this -> data [ 'oActiveArticle' ] = $ oActiveArticle ; if ( $ oModuleConfiguration -> fieldAllowRateReview ) { $ oReviewList = TdbShopArticleReviewList :: GetReviewsForArticleSortedByRate ( $ oActiveArticle -> id ) ; } else { $ oReviewList = TdbShopArticleReviewList :: GetListForShopArticleId ( $ oActiveArticle -> id ) ; } $ oReviewList -> AddFilterString ( "`shop_article_review`.`publish`='1'" ) ; return $ oReviewList ; }
Get the reviews for given shop article.

@param TdbShopArticle $oActiveArticle

@return TdbShopArticleReviewList
Get the reviews for given shop article .