Appends article dynamic url with additional request parameters

@param string $sAddParams additional parameters which needs to be added to product url
@param int    $iLang      language id
337971
public function appendStdLink($sAddParams, $iLang = null)
    {
        if ($sAddParams) {
            if ($iLang === null) {
                $iLang = $this->getLanguage();
            }

            $this->_aStdAddParams[$iLang] = isset($this->_aStdAddParams[$iLang]) ? $this->_aStdAddParams[$iLang] . "&amp;" : "";
            $this->_aStdAddParams[$iLang] .= $sAddParams;
        }
    }
1203721
protected function generateLinkForToBasketParameters($aParameters = array(), $bIncludePortalLink)
    {
        $activePage = $this->getActivePageService()->getActivePage();
        if (!is_object($activePage)) {
            $sLink = '?'.TTools::GetArrayAsURL($aParameters);
            if ($bIncludePortalLink) {
                /** @var Request $request */
                $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
                $sLink = $request->getSchemeAndHttpHost().$sLink;
            }
        } else {
            $sLink = $activePage->GetRealURLPlain($aParameters, $bIncludePortalLink);
        }

        return $sLink;
    }
1217756
protected void addDescription(PackageDoc pkg, Content dlTree, SearchIndexItem si) {
        Content link = getPackageLink(pkg, new StringContent(utils.getPackageName(pkg)));
        si.setLabel(utils.getPackageName(pkg));
        si.setCategory(getResource("doclet.Packages").toString());
        Content dt = HtmlTree.DT(link);
        dt.addContent(" - ");
        dt.addContent(getResource("doclet.package"));
        dt.addContent(" " + pkg.name());
        dlTree.addContent(dt);
        Content dd = new HtmlTree(HtmlTag.DD);
        addSummaryComment(pkg, dd);
        dlTree.addContent(dd);
    }
597029
protected function appendDataToURL()
    {
        $parameterString = '';
        if( is_array($this->packageOptions[ 'data' ]) && count($this->packageOptions[ 'data' ]) != 0 ) {
            $parameterString = '?'. http_build_query( $this->packageOptions[ 'data' ], null, '&' );
        }

        return $this->curlOptions[ 'URL' ] .= $parameterString;
    }
197796
protected function _getAltUri($sObjectId, $iLang)
    {
        $sSeoUrl = null;
        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $oArticle->setSkipAssign(true);
        if ($oArticle->loadInLang($iLang, $sObjectId)) {
            // choosing URI type to generate
            switch ($this->_getListType()) {
                case 'vendor':
                    $sSeoUrl = $this->getArticleVendorUri($oArticle, $iLang, true);
                    break;
                case 'manufacturer':
                    $sSeoUrl = $this->getArticleManufacturerUri($oArticle, $iLang, true);
                    break;
                default:
                    $sSeoUrl = $this->getArticleUri($oArticle, $iLang, true);
                    break;
            }
        }

        return $sSeoUrl;
    }
577834
private function buildUrlParams(
        string $url,
        array $params
    ) {
        array_walk($params, function (&$value, $key) {
            $value = "$key=$value";
        });

        return $url.'?'.implode('&', $params);
    }
742765
public function getAddUrlParams()
    {
        $dynamicParameters = parent::getAddUrlParams();
        if (!\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive()) {
            $pageNumber = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('pgNr');
            if ($pageNumber > 0) {
                $dynamicParameters .= ($dynamicParameters ? '&amp;' : '') . "pgNr={$pageNumber}";
            }
        }

        return $dynamicParameters;
    }
6528
public function addGlobalParams($oShop = null)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();

        $oShop = parent::addGlobalParams($oShop);

        // override cause of admin dir
        $sURL = $myConfig->getConfigParam('sShopURL') . $myConfig->getConfigParam('sAdminDir') . "/";

        if ($myConfig->getConfigParam('sAdminSSLURL')) {
            $sURL = $myConfig->getConfigParam('sAdminSSLURL');
        }

        $oViewConf = $this->getViewConfig();
        $oViewConf->setViewConfigParam('selflink', \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->processUrl($sURL . 'index.php?editlanguage=' . $this->_iEditLang, false));
        $oViewConf->setViewConfigParam('ajaxlink', str_replace('&amp;', '&', \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->processUrl($sURL . 'oxajax.php?editlanguage=' . $this->_iEditLang, false)));

        // set language of admin backend
        $this->_aViewData['adminlang'] = $oLang->getTplLanguage();
        $this->_aViewData['charset'] = $this->getCharSet();

        //setting active currency object
        $this->_aViewData["oActCur"] = $myConfig->getActShopCurrencyObject();

        return $oShop;
    }
1250060
public function addParams(array $addParams)
    {
        $parts = $this->split($this->url);

        parse_str($parts['query'], $params);
        $params = array_merge($params, $addParams);
        $parts['query'] = http_build_query($params);

        return $this->join($parts);
    }
15163
private function appendUrlMapping(QueryBuilder $queryBuilder, $locales)
    {
        $structures = $this->structureManager->getStructures(Structure::TYPE_PAGE);
        $urlNames = [];

        foreach ($structures as $structure) {
            if (!$structure->hasTag('sulu.rlp')) {
                continue;
            }

            $propertyName = $structure->getPropertyByTagName('sulu.rlp')->getName();

            if (!in_array($propertyName, $urlNames)) {
                $this->appendSingleMapping($queryBuilder, $propertyName, $locales);
                $urlNames[] = $propertyName;
            }
        }
    }
880097
private static function addParams($url, array $params = array())
    {
        $cParams = count($params);

        if ($cParams > 0) {
            $url .= '?';
            $idx = 1;
            foreach ($params as $key => $value) {
                $url .= $key.'='.$value;
                if ($idx < $cParams) {
                    $url .= '&';
                }
                ++$idx;
            }
        }

        return $url;
    }
1325521
function appendParams(url, specificParams) {
    // Assign default and specific parameters
    var params = Object.assign({}, defaultParams, specificParams);

    // Stringify the querystring params
    var paramsString = qs.stringify(params);

    // Empty params
    if (paramsString === '') {
      return url;
    }

    // Does url contain parameters already?
    var delim = url.includes('?') ? '&' : '?';

    return url + delim + paramsString;
  }
768572
protected function _addPageNrParam($url, $currentPage, $languageId = null)
    {
        if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive() && ($category = $this->getActiveCategory())) {
            if ($currentPage) {
                // only if page number > 0
                $url = $category->getBaseSeoLink($languageId, $currentPage);
            }
        } else {
            $url = parent::_addPageNrParam($url, $currentPage, $languageId);
        }

        return $url;
    }
222782
protected function _addUrlParameters($sUrl, $aParams)
    {
        $sDelimiter = ((getStr()->strpos($sUrl, '?') !== false)) ? '&' : '?';
        foreach ($aParams as $sName => $sVal) {
            $sUrl = $sUrl . $sDelimiter . $sName . '=' . $sVal;
            $sDelimiter = '&';
        }

        return $sUrl;
    }
483302
public function addLanguageParam($sSeoUrl, $iLang)
    {
        $iLang = (int) $iLang;
        $iDefLang = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iDefSeoLang');
        $aLangIds = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageIds();

        if ($iLang != $iDefLang &&
            isset($aLangIds[$iLang]) &&
            // #0006407 bugfix, we should not search for the string saved in the db but for the escaped string
            getStr()->strpos($sSeoUrl, $this->replaceSpecialChars($aLangIds[$iLang]) . '/') !== 0
        ) {
            $sSeoUrl = $aLangIds[$iLang] . '/' . $sSeoUrl;
        }

        return $sSeoUrl;
    }
1293635
function addAdresse($params=array())
    {
        $index = count($this->coordonnees);

        if (isset($params['adresse']) && $params['adresse']!='') {
            $this->coordonnees[$index]['adresse'] = $params['adresse'];
        } else {
            $this->coordonnees[$index]['adresse'] = '';
        }

        if (isset($params['link']) && $params['link']!='') {
            $this->coordonnees[$index]['link'] = $params['link'];
        } else {
            $this->coordonnees[$index]['link']='';
        }

        if (isset($params['imageFlag']) && $params['imageFlag']!='') {
            $this->coordonnees[$index]['imageFlag']=$params['imageFlag'];
        } else {
            $this->coordonnees[$index]['imageFlag']='';
        }

        if (isset($params['longitude']) && $params['longitude']!='' && isset($params['latitude']) && $params['latitude']!='') {
            $this->coordonnees[$index]['longitude'] = $params['longitude'];
            $this->coordonnees[$index]['latitude'] = $params['latitude'];
        }

        if (isset($params['setImageWidth'])) {
            $this->coordonnees[$index]['imageWidth'] = $params['setImageWidth'];
        }

        if (isset($params['setImageHeight'])) {
            $this->coordonnees[$index]['imageHeight'] = $params['setImageHeight'];
        }

        if (isset($params['pathToImageFlag']) && $params['pathToImageFlag']!='') {
            $this->coordonnees[$index]['pathToImageFlag']=$params['pathToImageFlag'];
        } else {
            $this->coordonnees[$index]['pathToImageFlag']='';
        }
    }
723976
protected function _prepareUri($sUri, $iLang = false)
    {
        // decoding entities
        $sUri = $this->encodeString($sUri, true, $iLang);

        // basic string preparation
        $oStr = getStr();
        $sUri = $oStr->strip_tags($sUri);

        // if found ".html" or "/" at the end - removing it temporary
        $sExt = $this->_getUrlExtension();
        if ($sExt === null) {
            $aMatched = [];
            if ($oStr->preg_match('/(\.html?|\/)$/i', $sUri, $aMatched)) {
                $sExt = $aMatched[0];
            } else {
                $sExt = '/';
            }
        }
        if ($sExt && $oStr->substr($sUri, 0 - $oStr->strlen($sExt)) == $sExt) {
            $sUri = $oStr->substr($sUri, 0, $oStr->strlen($sUri) - $oStr->strlen($sExt));
        }

        $sUri = $this->replaceSpecialChars($sUri);

        // SEO id is empty ?
        if (!$sUri && self::$_sPrefix) {
            $sUri = $this->_prepareUri(self::$_sPrefix, $iLang);
        }

        $sAdd = '_' . self::$_sPrefix;
        if ('/' != self::$_sSeparator) {
            $sAdd = self::$_sSeparator . self::$_sPrefix;
            $sUri = trim($sUri, self::$_sSeparator);
        }

        // binding the ending back
        $sUri .= $sExt;

        // lowercase uri if option is set
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blSEOLowerCaseUrls')) {
            $strUtility = Str::getStr();
            $sUri = $strUtility->strtolower($sUri);
        }

        // fix for not having url, which executes through /other/ script then seo decoder
        $sUri = $oStr->preg_replace("#^(/*)(" . implode('|', $this->_getReservedEntryKeys()) . ")(/|$)#i", "\$1\$2$sAdd\$3", $sUri);

        // cleaning
        $sQuotedSeparator = preg_quote(self::$_sSeparator, '/');

        return $oStr->preg_replace(
            ['|//+|', '/' . $sQuotedSeparator . $sQuotedSeparator . '+/'],
            ['/', self::$_sSeparator],
            $sUri
        );
    }