MetaModels\FrontendIntegration\FrontendFilter::getJumpToUrl PHP Method

getJumpToUrl() protected method

Generate an url determined by the given params and configured jumpTo page.
protected getJumpToUrl ( array $arrParams ) : string
$arrParams array The URL parameters to use.
return string the generated URL.
    protected function getJumpToUrl($arrParams)
    {
        $strFilterAction = '';
        foreach ($arrParams as $strName => $varParam) {
            // Skip the magic "language" parameter.
            if ($strName == 'language' && $GLOBALS['TL_CONFIG']['addLanguageToUrl']) {
                continue;
            }
            $strValue = $varParam;
            if (is_array($varParam)) {
                $strValue = implode(',', array_filter($varParam));
            }
            if (strlen($strValue)) {
                // Shift auto_item to the front.
                if ($strName == 'auto_item') {
                    $strFilterAction = '/' . $strValue . $strFilterAction;
                    continue;
                }
                $strFilterAction .= sprintf($GLOBALS['TL_CONFIG']['disableAlias'] ? '&%s=%s' : '/%s/%s', $strName, rawurlencode($strValue));
            }
        }
        return $strFilterAction;
    }