src/ShopBundle/objects/WebModules/MTShopArticleCatalogCore/MTShopArticleCatalogCoreEndPoint.class.php
protected function ViewArticleHook()
    {
        $this->SetTemplate('MTShopArticleCatalog', 'system/article');

        // add review item and fill with user data
        $oReviewItem = TdbShopArticleReview::GetNewInstance();
        /** @var $oReviewItem TdbShopArticleReview */
        $oGlobal = TGlobal::instance();
        $aReviewData = array();
        if ($oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
            $aReviewData = $oGlobal->GetUserData(TdbShopArticleReview::INPUT_BASE_NAME);
        } else {
            $oUser = TdbDataExtranetUser::GetInstance();
            if ($oUser->IsLoggedIn()) {
                $aReviewData['author_name'] = $oUser->GetUserAlias();
                $aReviewData['author_email'] = $oUser->GetUserEMail();
            }
        }
        $aReviewData['captcha-question'] = $this->GenerateCaptcha();

        if (is_array($aReviewData)) {
            $oReviewItem->LoadFromRowProtected($aReviewData);
        }
        $this->data['oReviewEntryItem'] = &$oReviewItem;
    }
protected function ViewArticleHook()
    {
        $this->SetTemplate('MTShopArticleCatalog', 'system/article');

        // add review item and fill with user data
        $oReviewItem = TdbShopArticleReview::GetNewInstance();
        /** @var $oReviewItem TdbShopArticleReview */
        $oGlobal = TGlobal::instance();
        $aReviewData = array();
        if ($oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
            $aReviewData = $oGlobal->GetUserData(TdbShopArticleReview::INPUT_BASE_NAME);
        } else {
            $oUser = TdbDataExtranetUser::GetInstance();
            if ($oUser->IsLoggedIn()) {
                $aReviewData['author_name'] = $oUser->GetUserAlias();
                $aReviewData['author_email'] = $oUser->GetUserEMail();
            }
        }
        $aReviewData['captcha-question'] = $this->GenerateCaptcha();

        if (is_array($aReviewData)) {
            $oReviewItem->LoadFromRowProtected($aReviewData);
        }
        $this->data['oReviewEntryItem'] = &$oReviewItem;
    }
protected function ViewArticleHook ( ) { $ this -> SetTemplate ( 'MTShopArticleCatalog' , 'system/article' ) ; // add review item and fill with user data $ oReviewItem = TdbShopArticleReview :: GetNewInstance ( ) ; /** @var $oReviewItem TdbShopArticleReview */ $ oGlobal = TGlobal :: instance ( ) ; $ aReviewData = array ( ) ; if ( $ oGlobal -> UserDataExists ( TdbShopArticleReview :: INPUT_BASE_NAME ) ) { $ aReviewData = $ oGlobal -> GetUserData ( TdbShopArticleReview :: INPUT_BASE_NAME ) ; } else { $ oUser = TdbDataExtranetUser :: GetInstance ( ) ; if ( $ oUser -> IsLoggedIn ( ) ) { $ aReviewData [ 'author_name' ] = $ oUser -> GetUserAlias ( ) ; $ aReviewData [ 'author_email' ] = $ oUser -> GetUserEMail ( ) ; } } $ aReviewData [ 'captcha-question' ] = $ this -> GenerateCaptcha ( ) ; if ( is_array ( $ aReviewData ) ) { $ oReviewItem -> LoadFromRowProtected ( $ aReviewData ) ; } $ this -> data [ 'oReviewEntryItem' ] = & $ oReviewItem ; }
called if the user requested to view an item.
called if the user requested to view an item .