source/Application/Component/Widget/ServiceMenu.php
public function getCompareItems($blJson = false)
    {
        $oCompare = oxNew(\OxidEsales\Eshop\Application\Controller\CompareController::class);
        $aCompareItems = $oCompare->getCompareItems();

        if ($blJson) {
            $aCompareItems = json_encode($aCompareItems);
        }

        return $aCompareItems;
    }
public function getCompareItems($blJson = false)
    {
        $oCompare = oxNew(\OxidEsales\Eshop\Application\Controller\CompareController::class);
        $aCompareItems = $oCompare->getCompareItems();

        if ($blJson) {
            $aCompareItems = json_encode($aCompareItems);
        }

        return $aCompareItems;
    }
public function getCompareItems ( $ blJson = false ) { $ oCompare = oxNew ( \ OxidEsales \ Eshop \ Application \ Controller \ CompareController :: class ) ; $ aCompareItems = $ oCompare -> getCompareItems ( ) ; if ( $ blJson ) { $ aCompareItems = json_encode ( $ aCompareItems ) ; } return $ aCompareItems ; }
Template variable getter. Returns comparison article list.

@param bool $blJson return json encoded array

@return array
Template variable getter . Returns comparison article list .