source/Application/Model/CategoryList.php
protected function _ppBuildTree()
    {
        $aTree = [];
        foreach ($this->_aArray as $oCat) {
            $sParentId = $oCat->oxcategories__oxparentid->value;
            if ($sParentId != 'oxrootid') {
                if (isset($this->_aArray[$sParentId])) {
                    $this->_aArray[$sParentId]->setSubCat($oCat, $oCat->getId());
                }
            } else {
                $aTree[$oCat->getId()] = $oCat;
            }
        }

        $this->assign($aTree);
    }
protected function _ppBuildTree()
    {
        $aTree = [];
        foreach ($this->_aArray as $oCat) {
            $sParentId = $oCat->oxcategories__oxparentid->value;
            if ($sParentId != 'oxrootid') {
                if (isset($this->_aArray[$sParentId])) {
                    $this->_aArray[$sParentId]->setSubCat($oCat, $oCat->getId());
                }
            } else {
                $aTree[$oCat->getId()] = $oCat;
            }
        }

        $this->assign($aTree);
    }
protected function _ppBuildTree ( ) { $ aTree = [ ] ; foreach ( $ this -> _aArray as $ oCat ) { $ sParentId = $ oCat -> oxcategories__oxparentid -> value ; if ( $ sParentId != 'oxrootid' ) { if ( isset ( $ this -> _aArray [ $ sParentId ] ) ) { $ this -> _aArray [ $ sParentId ] -> setSubCat ( $ oCat , $ oCat -> getId ( ) ) ; } } else { $ aTree [ $ oCat -> getId ( ) ] = $ oCat ; } } $ this -> assign ( $ aTree ) ; }
Category list postprocessing routine, responsible building an sorting of hierarchical category tree
Category list postprocessing routine responsible building an sorting of hierarchical category tree