src/FrontendIntegration/InsertTags.php
protected function jumpTo($mixMetaModel, $mixDataId, $intIdRenderSetting, $strParam = 'url')
    {
        // Set the param to url if empty.
        if (empty($strParam)) {
            $strParam = 'url';
        }

        // Get the MetaModel. Return if we can not find one.
        $objMetaModel = $this->loadMetaModel($mixMetaModel);
        if ($objMetaModel == null) {
            return false;
        }

        // Get the render setting.
        $objRenderSettings = $this
            ->getServiceContainer()
            ->getRenderSettingFactory()
            ->createCollection($objMetaModel, $intIdRenderSetting);
        if ($objRenderSettings == null) {
            return false;
        }

        // Get the data row.
        $objItem = $objMetaModel->findById($mixDataId);
        if ($objItem == null) {
            return false;
        }

        // Render the item and check if we have a jump to.
        $arrRenderedItem = $objItem->parseValue('text', $objRenderSettings);
        if (!isset($arrRenderedItem['jumpTo'])) {
            return false;
        }

        // Check if someone want the sub params.
        if (stripos($strParam, 'params.') !== false) {
            $mixAttName = StringUtil::trimsplit('.', $strParam);
            $mixAttName = array_pop($mixAttName);

            if (isset($arrRenderedItem['jumpTo']['params'][$mixAttName])) {
                return $arrRenderedItem['jumpTo']['params'][$mixAttName];
            }
        } elseif (isset($arrRenderedItem['jumpTo'][$strParam])) {
            // Else just return the ask param.
            return $arrRenderedItem['jumpTo'][$strParam];
        }

        // Nothing hit the output. Return false.
        return false;
    }
protected function jumpTo($mixMetaModel, $mixDataId, $intIdRenderSetting, $strParam = 'url')
    {
        // Set the param to url if empty.
        if (empty($strParam)) {
            $strParam = 'url';
        }

        // Get the MetaModel. Return if we can not find one.
        $objMetaModel = $this->loadMetaModel($mixMetaModel);
        if ($objMetaModel == null) {
            return false;
        }

        // Get the render setting.
        $objRenderSettings = $this
            ->getServiceContainer()
            ->getRenderSettingFactory()
            ->createCollection($objMetaModel, $intIdRenderSetting);
        if ($objRenderSettings == null) {
            return false;
        }

        // Get the data row.
        $objItem = $objMetaModel->findById($mixDataId);
        if ($objItem == null) {
            return false;
        }

        // Render the item and check if we have a jump to.
        $arrRenderedItem = $objItem->parseValue('text', $objRenderSettings);
        if (!isset($arrRenderedItem['jumpTo'])) {
            return false;
        }

        // Check if someone want the sub params.
        if (stripos($strParam, 'params.') !== false) {
            $mixAttName = StringUtil::trimsplit('.', $strParam);
            $mixAttName = array_pop($mixAttName);

            if (isset($arrRenderedItem['jumpTo']['params'][$mixAttName])) {
                return $arrRenderedItem['jumpTo']['params'][$mixAttName];
            }
        } elseif (isset($arrRenderedItem['jumpTo'][$strParam])) {
            // Else just return the ask param.
            return $arrRenderedItem['jumpTo'][$strParam];
        }

        // Nothing hit the output. Return false.
        return false;
    }
Get the jumpTo for a chosen value.

@param string|int $mixMetaModel       ID or name of MetaModels.

@param int        $mixDataId          ID of the data row.

@param int        $intIdRenderSetting ID of render setting.

@param string     $strParam           Name of parameter - Default:url|label|page|params.[attrname].

@return boolean|string Return false when nothing was found for the requested value.