source/Application/Model/CategoryList.php
protected function _ppAddDepthInformation()
    {
        $aTree = [];
        foreach ($this->_aArray as $oCat) {
            $aTree[$oCat->getId()] = $oCat;
            $aSubCats = $oCat->getSubCats();
            if (count($aSubCats) > 0) {
                foreach ($aSubCats as $oSubCat) {
                    $aTree = $this->_addDepthInfo($aTree, $oSubCat);
                }
            }
        }
        $this->assign($aTree);
    }
protected function _ppAddDepthInformation()
    {
        $aTree = [];
        foreach ($this->_aArray as $oCat) {
            $aTree[$oCat->getId()] = $oCat;
            $aSubCats = $oCat->getSubCats();
            if (count($aSubCats) > 0) {
                foreach ($aSubCats as $oSubCat) {
                    $aTree = $this->_addDepthInfo($aTree, $oSubCat);
                }
            }
        }
        $this->assign($aTree);
    }
protected function _ppAddDepthInformation ( ) { $ aTree = [ ] ; foreach ( $ this -> _aArray as $ oCat ) { $ aTree [ $ oCat -> getId ( ) ] = $ oCat ; $ aSubCats = $ oCat -> getSubCats ( ) ; if ( count ( $ aSubCats ) > 0 ) { foreach ( $ aSubCats as $ oSubCat ) { $ aTree = $ this -> _addDepthInfo ( $ aTree , $ oSubCat ) ; } } } $ this -> assign ( $ aTree ) ; }
Category list postprocessing routine, responsible for making flat category tree and adding depth information.
Requires reversed category list!
Category list postprocessing routine responsible for making flat category tree and adding depth information . Requires reversed category list!