public function getBannerInWrapper($bannercode, Pap_Common_Banner $banner, Pap_Common_User $user){
        $wrapper = new Pap_Db_BannerWrapper();
        $wrapper->setId($banner->getWrapperId());
        $wrapper->load();


        $code = $wrapper->getCode();
        $code = $this->replaceConstant(self::CONST_WIDTH, $banner->getWidth(), $code);
        $code = $this->replaceConstant(self::CONST_HEIGHT, $banner->getHeight(), $code);
        $code = $this->replaceConstant(self::CONST_HTML, $bannercode, $code);
        $code = $this->replaceConstant(self::CONST_NAME, $banner->getName(), $code);
        $code = $this->replaceConstant(self::CONST_BANNERID, $banner->getId(), $code);
        $completeUrl = $banner->getBannerScriptUrl($user)
        . '&' . self::URL_PARAM_WRAPPER . '=' . self::URL_VALUE_INNERPAGE;
        if($banner->getDynamicLink() != '') {
            $completeUrl .= '&'. Pap_Db_Table_CachedBanners::DYNAMIC_LINK . '=' . urlencode($banner->getDynamicLink());
        }
        $code = $this->replaceConstant(self::CONST_HTMLCOMPL, $completeUrl, $code);
        $code = $this->replaceConstant(self::CONST_HTMLCOMPL_ENCODED, urlencode($completeUrl), $code);
        $code = $this->replaceConstant(self::CONST_HTMLCLEAN, $banner->getBannerScriptUrl($user)
        . '&' . self::URL_PARAM_WRAPPER . '=' . self::URL_VALUE_CLEAN, $code);
        $code = $this->replaceConstant(self::CONST_CLICKURL, $banner->getClickUrl($user), $code);
        $code = $this->replaceConstant(self::CONST_TARGETURL, $banner->getDestinationUrl($user), $code);
        $code = $this->replaceConstant(self::CONST_HTMLJSURL, $banner->getBannerScriptUrl($user), $code);
        $code = $this->replaceConstant(self::CONST_SEOSTRING, $banner->getSeoString(), $code);
        return Pap_Common_Banner::cleanIncompleteCode($code);
    }