source/Application/Controller/Admin/ArticleReview.php
protected function _getReviewList($article)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $query = "select oxreviews.* from oxreviews
                     where oxreviews.OXOBJECTID = " . $database->quote($article->oxarticles__oxid->value) . "
                     and oxreviews.oxtype = 'oxarticle'";

        $variantList = $article->getVariants();

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blShowVariantReviews') && count($variantList)) {
            // verifying rights
            foreach ($variantList as $variant) {
                $query .= "or oxreviews.oxobjectid = " . $database->quote($variant->oxarticles__oxid->value) . " ";
            }
        }

        //$sSelect .= "and oxreviews.oxtext".\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag($this->_iEditLang)." != ''";
        $query .= "and oxreviews.oxlang = '" . $this->_iEditLang . "'";
        $query .= "and oxreviews.oxtext != '' ";

        // all reviews
        $reviewList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $reviewList->init("oxreview");
        $reviewList->selectString($query);

        return $reviewList;
    }
protected function _getReviewList($article)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $query = "select oxreviews.* from oxreviews
                     where oxreviews.OXOBJECTID = " . $database->quote($article->oxarticles__oxid->value) . "
                     and oxreviews.oxtype = 'oxarticle'";

        $variantList = $article->getVariants();

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blShowVariantReviews') && count($variantList)) {
            // verifying rights
            foreach ($variantList as $variant) {
                $query .= "or oxreviews.oxobjectid = " . $database->quote($variant->oxarticles__oxid->value) . " ";
            }
        }

        //$sSelect .= "and oxreviews.oxtext".\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag($this->_iEditLang)." != ''";
        $query .= "and oxreviews.oxlang = '" . $this->_iEditLang . "'";
        $query .= "and oxreviews.oxtext != '' ";

        // all reviews
        $reviewList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $reviewList->init("oxreview");
        $reviewList->selectString($query);

        return $reviewList;
    }
protected function _getReviewList ( $ article ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ query = "select oxreviews.* from oxreviews
                     where oxreviews.OXOBJECTID = " . $ database -> quote ( $ article -> oxarticles__oxid -> value ) . "
                     and oxreviews.oxtype = 'oxarticle'" ; $ variantList = $ article -> getVariants ( ) ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'blShowVariantReviews' ) && count ( $ variantList ) ) { // verifying rights foreach ( $ variantList as $ variant ) { $ query .= "or oxreviews.oxobjectid = " . $ database -> quote ( $ variant -> oxarticles__oxid -> value ) . " " ; } } //$sSelect .= "and oxreviews.oxtext".\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag($this->_iEditLang)." != ''"; $ query .= "and oxreviews.oxlang = '" . $ this -> _iEditLang . "'" ; $ query .= "and oxreviews.oxtext != '' " ; // all reviews $ reviewList = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ ListModel :: class ) ; $ reviewList -> init ( "oxreview" ) ; $ reviewList -> selectString ( $ query ) ; return $ reviewList ; }
returns reviews list for article

@param \OxidEsales\Eshop\Application\Model\Article $article Article object

@return oxList
returns reviews list for article