src/ShopWishlistBundle/objects/db/TShopWishlistArticle.class.php
public function GetToWishlistLink($bIncludePortalLink = false, $bRedirectToLoginPage = true)
    {
        $oShopConfig = TdbShop::GetInstance();

        $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_ITEM_AMOUNT => 1, MTShopBasketCore::URL_MESSAGE_CONSUMER => $this->GetMessageConsumerName());

        $aIncludeParams = TdbShop::GetURLPageStateParameters();
        $oGlobal = TGlobal::instance();
        foreach ($aIncludeParams as $sKeyName) {
            if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) {
                $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName);
            }
        }

        $oActivePage = $this->getActivePageService()->getActivePage();
        $sLink = $oActivePage->GetRealURLPlain($aParameters, $bIncludePortalLink);
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($bRedirectToLoginPage && !$oUser->IsLoggedIn()) {
            $sSuccessLink = $sLink;
            $oExtranet = TdbDataExtranet::GetInstance();
            $sLoginPageURL = $oExtranet->GetLinkLoginPage(true);
            $sLink = $sLoginPageURL.'?sSuccessURL='.urlencode($sSuccessLink);
        }

        return $sLink;
    }
public function GetToWishlistLink($bIncludePortalLink = false, $bRedirectToLoginPage = true)
    {
        $oShopConfig = TdbShop::GetInstance();

        $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_ITEM_AMOUNT => 1, MTShopBasketCore::URL_MESSAGE_CONSUMER => $this->GetMessageConsumerName());

        $aIncludeParams = TdbShop::GetURLPageStateParameters();
        $oGlobal = TGlobal::instance();
        foreach ($aIncludeParams as $sKeyName) {
            if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) {
                $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName);
            }
        }

        $oActivePage = $this->getActivePageService()->getActivePage();
        $sLink = $oActivePage->GetRealURLPlain($aParameters, $bIncludePortalLink);
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($bRedirectToLoginPage && !$oUser->IsLoggedIn()) {
            $sSuccessLink = $sLink;
            $oExtranet = TdbDataExtranet::GetInstance();
            $sLoginPageURL = $oExtranet->GetLinkLoginPage(true);
            $sLink = $sLoginPageURL.'?sSuccessURL='.urlencode($sSuccessLink);
        }

        return $sLink;
    }
public function GetToWishlistLink ( $ bIncludePortalLink = false , $ bRedirectToLoginPage = true ) { $ oShopConfig = TdbShop :: GetInstance ( ) ; $ aParameters = array ( 'module_fnc[' . $ oShopConfig -> GetBasketModuleSpotName ( ) . ']' => 'AddToWishlist' , MTShopBasketCore :: URL_ITEM_ID => $ this -> id , MTShopBasketCore :: URL_ITEM_AMOUNT => 1 , MTShopBasketCore :: URL_MESSAGE_CONSUMER => $ this -> GetMessageConsumerName ( ) ) ; $ aIncludeParams = TdbShop :: GetURLPageStateParameters ( ) ; $ oGlobal = TGlobal :: instance ( ) ; foreach ( $ aIncludeParams as $ sKeyName ) { if ( $ oGlobal -> UserDataExists ( $ sKeyName ) && ! array_key_exists ( $ sKeyName , $ aParameters ) ) { $ aParameters [ $ sKeyName ] = $ oGlobal -> GetUserData ( $ sKeyName ) ; } } $ oActivePage = $ this -> getActivePageService ( ) -> getActivePage ( ) ; $ sLink = $ oActivePage -> GetRealURLPlain ( $ aParameters , $ bIncludePortalLink ) ; $ oUser = TdbDataExtranetUser :: GetInstance ( ) ; if ( $ bRedirectToLoginPage && ! $ oUser -> IsLoggedIn ( ) ) { $ sSuccessLink = $ sLink ; $ oExtranet = TdbDataExtranet :: GetInstance ( ) ; $ sLoginPageURL = $ oExtranet -> GetLinkLoginPage ( true ) ; $ sLink = $ sLoginPageURL . '?sSuccessURL=' . urlencode ( $ sSuccessLink ) ; } return $ sLink ; }
return the link that can be used to add the article to the users wishlist.

@param bool $bIncludePortalLink

@return string
return the link that can be used to add the article to the users wishlist .