source/Core/UtilsView.php
public function parseThroughSmarty($sDesc, $sOxid = null, $oActView = null, $blRecompile = false)
    {
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->isDemoShop()) {
            return $sDesc;
        }

        startProfile("parseThroughSmarty");

        if (!is_array($sDesc) && strpos($sDesc, "[{") === false) {
            stopProfile("parseThroughSmarty");

            return $sDesc;
        }

        $activeLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage();

        // now parse it through smarty
        $smarty = clone $this->getSmarty();

        // save old tpl data
        $tplVars = $smarty->_tpl_vars;
        $forceRecompile = $smarty->force_compile;

        $smarty->force_compile = $blRecompile;

        if (!$oActView) {
            $oActView = oxNew(\OxidEsales\Eshop\Application\Controller\FrontendController::class);
            $oActView->addGlobalParams();
        }

        $viewData = $oActView->getViewData();
        foreach (array_keys($viewData) as $name) {
            $smarty->assign($name, $viewData[$name]);
        }

        if (is_array($sDesc)) {
            foreach ($sDesc as $name => $aData) {
                $smarty->oxidcache = new \OxidEsales\Eshop\Core\Field($aData[1], \OxidEsales\Eshop\Core\Field::T_RAW);
                $result[$name] = $smarty->fetch("ox:" . $aData[0] . $activeLanguageId);
            }
        } else {
            $smarty->oxidcache = new \OxidEsales\Eshop\Core\Field($sDesc, \OxidEsales\Eshop\Core\Field::T_RAW);
            $result = $smarty->fetch("ox:{$sOxid}{$activeLanguageId}");
        }

        // restore tpl vars for continuing smarty processing if it is in one
        $smarty->_tpl_vars = $tplVars;
        $smarty->force_compile = $forceRecompile;

        stopProfile("parseThroughSmarty");

        return $result;
    }
public function parseThroughSmarty($sDesc, $sOxid = null, $oActView = null, $blRecompile = false)
    {
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->isDemoShop()) {
            return $sDesc;
        }

        startProfile("parseThroughSmarty");

        if (!is_array($sDesc) && strpos($sDesc, "[{") === false) {
            stopProfile("parseThroughSmarty");

            return $sDesc;
        }

        $activeLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage();

        // now parse it through smarty
        $smarty = clone $this->getSmarty();

        // save old tpl data
        $tplVars = $smarty->_tpl_vars;
        $forceRecompile = $smarty->force_compile;

        $smarty->force_compile = $blRecompile;

        if (!$oActView) {
            $oActView = oxNew(\OxidEsales\Eshop\Application\Controller\FrontendController::class);
            $oActView->addGlobalParams();
        }

        $viewData = $oActView->getViewData();
        foreach (array_keys($viewData) as $name) {
            $smarty->assign($name, $viewData[$name]);
        }

        if (is_array($sDesc)) {
            foreach ($sDesc as $name => $aData) {
                $smarty->oxidcache = new \OxidEsales\Eshop\Core\Field($aData[1], \OxidEsales\Eshop\Core\Field::T_RAW);
                $result[$name] = $smarty->fetch("ox:" . $aData[0] . $activeLanguageId);
            }
        } else {
            $smarty->oxidcache = new \OxidEsales\Eshop\Core\Field($sDesc, \OxidEsales\Eshop\Core\Field::T_RAW);
            $result = $smarty->fetch("ox:{$sOxid}{$activeLanguageId}");
        }

        // restore tpl vars for continuing smarty processing if it is in one
        $smarty->_tpl_vars = $tplVars;
        $smarty->force_compile = $forceRecompile;

        stopProfile("parseThroughSmarty");

        return $result;
    }
public function parseThroughSmarty ( $ sDesc , $ sOxid = null , $ oActView = null , $ blRecompile = false ) { if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> isDemoShop ( ) ) { return $ sDesc ; } startProfile ( "parseThroughSmarty" ) ; if ( ! is_array ( $ sDesc ) && strpos ( $ sDesc , "[{" ) === false ) { stopProfile ( "parseThroughSmarty" ) ; return $ sDesc ; } $ activeLanguageId = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> getTplLanguage ( ) ; // now parse it through smarty $ smarty = clone $ this -> getSmarty ( ) ; // save old tpl data $ tplVars = $ smarty -> _tpl_vars ; $ forceRecompile = $ smarty -> force_compile ; $ smarty -> force_compile = $ blRecompile ; if ( ! $ oActView ) { $ oActView = oxNew ( \ OxidEsales \ Eshop \ Application \ Controller \ FrontendController :: class ) ; $ oActView -> addGlobalParams ( ) ; } $ viewData = $ oActView -> getViewData ( ) ; foreach ( array_keys ( $ viewData ) as $ name ) { $ smarty -> assign ( $ name , $ viewData [ $ name ] ) ; } if ( is_array ( $ sDesc ) ) { foreach ( $ sDesc as $ name => $ aData ) { $ smarty -> oxidcache = new \ OxidEsales \ Eshop \ Core \ Field ( $ aData [ 1 ] , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ result [ $ name ] = $ smarty -> fetch ( "ox:" . $ aData [ 0 ] . $ activeLanguageId ) ; } } else { $ smarty -> oxidcache = new \ OxidEsales \ Eshop \ Core \ Field ( $ sDesc , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ result = $ smarty -> fetch ( "ox:{$sOxid}{$activeLanguageId}" ) ; } // restore tpl vars for continuing smarty processing if it is in one $ smarty -> _tpl_vars = $ tplVars ; $ smarty -> force_compile = $ forceRecompile ; stopProfile ( "parseThroughSmarty" ) ; return $ result ; }
Runs long description through smarty. If you pass array of data
to process, array will be returned, if you pass string - string
will be passed as result

@param mixed                                            $sDesc       description or array of descriptions
(array( [] => array(_ident_, _value_to_process_)))
@param string                                           $sOxid       current object id
@param \OxidEsales\Eshop\Core\Controller\BaseController $oActView    view data to use its view data (optional)
@param bool                                             $blRecompile force to recompile if found in cache

@return mixed
Runs long description through smarty . If you pass array of data to process array will be returned if you pass string - string will be passed as result