source/Application/Model/SeoEncoderContent.php
public function getContentUri($oCont, $iLang = null, $blRegenerate = false)
    {
        if (!isset($iLang)) {
            $iLang = $oCont->getLanguage();
        }
        //load details link from DB
        if ($blRegenerate || !($sSeoUrl = $this->_loadFromDb('oxContent', $oCont->getId(), $iLang))) {
            if ($iLang != $oCont->getLanguage()) {
                $sId = $oCont->getId();
                $oCont = oxNew(\OxidEsales\Eshop\Application\Model\Content::class);
                $oCont->loadInLang($iLang, $sId);
            }

            $sSeoUrl = '';
            if ($oCont->getCategoryId() && $oCont->getType() === 2) {
                $oCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
                if ($oCat->loadInLang($iLang, $oCont->oxcontents__oxcatid->value)) {
                    $sParentId = $oCat->oxcategories__oxparentid->value;
                    if ($sParentId && $sParentId != 'oxrootid') {
                        $oParentCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
                        if ($oParentCat->loadInLang($iLang, $oCat->oxcategories__oxparentid->value)) {
                            $sSeoUrl .= \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderCategory::class)->getCategoryUri($oParentCat);
                        }
                    }
                }
            }

            $sSeoUrl .= $this->_prepareTitle($oCont->oxcontents__oxtitle->value, false, $oCont->getLanguage()) . '/';
            $sSeoUrl = $this->_processSeoUrl($sSeoUrl, $oCont->getId(), $iLang);

            $this->_saveToDb('oxcontent', $oCont->getId(), $oCont->getBaseStdLink($iLang), $sSeoUrl, $iLang);
        }

        return $sSeoUrl;
    }
public function getContentUri($oCont, $iLang = null, $blRegenerate = false)
    {
        if (!isset($iLang)) {
            $iLang = $oCont->getLanguage();
        }
        //load details link from DB
        if ($blRegenerate || !($sSeoUrl = $this->_loadFromDb('oxContent', $oCont->getId(), $iLang))) {
            if ($iLang != $oCont->getLanguage()) {
                $sId = $oCont->getId();
                $oCont = oxNew(\OxidEsales\Eshop\Application\Model\Content::class);
                $oCont->loadInLang($iLang, $sId);
            }

            $sSeoUrl = '';
            if ($oCont->getCategoryId() && $oCont->getType() === 2) {
                $oCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
                if ($oCat->loadInLang($iLang, $oCont->oxcontents__oxcatid->value)) {
                    $sParentId = $oCat->oxcategories__oxparentid->value;
                    if ($sParentId && $sParentId != 'oxrootid') {
                        $oParentCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
                        if ($oParentCat->loadInLang($iLang, $oCat->oxcategories__oxparentid->value)) {
                            $sSeoUrl .= \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderCategory::class)->getCategoryUri($oParentCat);
                        }
                    }
                }
            }

            $sSeoUrl .= $this->_prepareTitle($oCont->oxcontents__oxtitle->value, false, $oCont->getLanguage()) . '/';
            $sSeoUrl = $this->_processSeoUrl($sSeoUrl, $oCont->getId(), $iLang);

            $this->_saveToDb('oxcontent', $oCont->getId(), $oCont->getBaseStdLink($iLang), $sSeoUrl, $iLang);
        }

        return $sSeoUrl;
    }
public function getContentUri ( $ oCont , $ iLang = null , $ blRegenerate = false ) { if ( ! isset ( $ iLang ) ) { $ iLang = $ oCont -> getLanguage ( ) ; } //load details link from DB if ( $ blRegenerate || ! ( $ sSeoUrl = $ this -> _loadFromDb ( 'oxContent' , $ oCont -> getId ( ) , $ iLang ) ) ) { if ( $ iLang != $ oCont -> getLanguage ( ) ) { $ sId = $ oCont -> getId ( ) ; $ oCont = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Content :: class ) ; $ oCont -> loadInLang ( $ iLang , $ sId ) ; } $ sSeoUrl = '' ; if ( $ oCont -> getCategoryId ( ) && $ oCont -> getType ( ) === 2 ) { $ oCat = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Category :: class ) ; if ( $ oCat -> loadInLang ( $ iLang , $ oCont -> oxcontents__oxcatid -> value ) ) { $ sParentId = $ oCat -> oxcategories__oxparentid -> value ; if ( $ sParentId && $ sParentId != 'oxrootid' ) { $ oParentCat = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Category :: class ) ; if ( $ oParentCat -> loadInLang ( $ iLang , $ oCat -> oxcategories__oxparentid -> value ) ) { $ sSeoUrl .= \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Application \ Model \ SeoEncoderCategory :: class ) -> getCategoryUri ( $ oParentCat ) ; } } } } $ sSeoUrl .= $ this -> _prepareTitle ( $ oCont -> oxcontents__oxtitle -> value , false , $ oCont -> getLanguage ( ) ) . '/' ; $ sSeoUrl = $ this -> _processSeoUrl ( $ sSeoUrl , $ oCont -> getId ( ) , $ iLang ) ; $ this -> _saveToDb ( 'oxcontent' , $ oCont -> getId ( ) , $ oCont -> getBaseStdLink ( $ iLang ) , $ sSeoUrl , $ iLang ) ; } return $ sSeoUrl ; }
Returns SEO uri for content object. Includes parent category path info if
content is assigned to it

@param \OxidEsales\Eshop\Application\Model\Content $oCont        content category object
@param int                                         $iLang        language
@param bool                                        $blRegenerate if TRUE forces seo url regeneration

@return string
Returns SEO uri for content object . Includes parent category path info if content is assigned to it