src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php
protected function CreateReview($aUserData, $oArticle)
    {
        $oModuleConfiguration = $this->GetModuleConfiguration();
        $oReviewItem = TdbShopArticleReview::GetNewInstance(); /*@var $oReviewItem TdbShopArticleReview*/
        $aUserData['shop_article_id'] = $oArticle->id;
        $oReviewItem->LoadFromRowProtected($aUserData);
        if ($oModuleConfiguration->fieldManageReviews) {
            $oReviewItem->sqlData['publish'] = '0';
        } else {
            $oReviewItem->sqlData['publish'] = '1';
        }
        $oReviewItem->AllowEditByAll(true);
        $oReviewItem->Save();

        return $oReviewItem;
    }
protected function CreateReview($aUserData, $oArticle)
    {
        $oModuleConfiguration = $this->GetModuleConfiguration();
        $oReviewItem = TdbShopArticleReview::GetNewInstance(); /*@var $oReviewItem TdbShopArticleReview*/
        $aUserData['shop_article_id'] = $oArticle->id;
        $oReviewItem->LoadFromRowProtected($aUserData);
        if ($oModuleConfiguration->fieldManageReviews) {
            $oReviewItem->sqlData['publish'] = '0';
        } else {
            $oReviewItem->sqlData['publish'] = '1';
        }
        $oReviewItem->AllowEditByAll(true);
        $oReviewItem->Save();

        return $oReviewItem;
    }
protected function CreateReview ( $ aUserData , $ oArticle ) { $ oModuleConfiguration = $ this -> GetModuleConfiguration ( ) ; $ oReviewItem = TdbShopArticleReview :: GetNewInstance ( ) ; /*@var $oReviewItem TdbShopArticleReview*/ $ aUserData [ 'shop_article_id' ] = $ oArticle -> id ; $ oReviewItem -> LoadFromRowProtected ( $ aUserData ) ; if ( $ oModuleConfiguration -> fieldManageReviews ) { $ oReviewItem -> sqlData [ 'publish' ] = '0' ; } else { $ oReviewItem -> sqlData [ 'publish' ] = '1' ; } $ oReviewItem -> AllowEditByAll ( true ) ; $ oReviewItem -> Save ( ) ; return $ oReviewItem ; }
Create a new review for given article with given data.

@param array          $aUserData
@param TdbShopArticle $oArticle

@return TdbShopArticleReview
Create a new review for given article with given data .