src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php
protected function LoadChildTreeExecute($sChildCategoryId)
    {
        $sSelect = $this->GetQuery($sChildCategoryId);
        $oChildCategoryList = TdbShopCategoryList::GetList($sSelect);
        if ($oChildCategoryList->Length() > 1) {
            $this->oChildCategoryTreeList = new TIterator();
        }
        while ($oChildCategory = $oChildCategoryList->Next()) {
            if ($oChildCategory->id == $sChildCategoryId) {
                $this->oRealCategory = $oChildCategory;
                $this->iItemCount = 0;
                $this->iAllItemCount = 0;
                $this->id = $oChildCategory->id;
            } else {
                $oMainTree = new self();
                $oMainTree->LoadChildTreeExecute($oChildCategory->id);
                $this->aContainingChildCategories = array_merge($this->aContainingChildCategories, $oMainTree->aContainingChildCategories);
                $this->iAllItemCount = $this->iAllItemCount + $oMainTree->iAllItemCount;
                $this->oChildCategoryTreeList->AddItem($oMainTree);
                $this->aContainingChildCategories[$oChildCategory->id] = $oChildCategory->GetName();
            }
        }
        if (empty($this->id)) {
            $this->id = TTools::GetUUID();
        }
    }
protected function LoadChildTreeExecute($sChildCategoryId)
    {
        $sSelect = $this->GetQuery($sChildCategoryId);
        $oChildCategoryList = TdbShopCategoryList::GetList($sSelect);
        if ($oChildCategoryList->Length() > 1) {
            $this->oChildCategoryTreeList = new TIterator();
        }
        while ($oChildCategory = $oChildCategoryList->Next()) {
            if ($oChildCategory->id == $sChildCategoryId) {
                $this->oRealCategory = $oChildCategory;
                $this->iItemCount = 0;
                $this->iAllItemCount = 0;
                $this->id = $oChildCategory->id;
            } else {
                $oMainTree = new self();
                $oMainTree->LoadChildTreeExecute($oChildCategory->id);
                $this->aContainingChildCategories = array_merge($this->aContainingChildCategories, $oMainTree->aContainingChildCategories);
                $this->iAllItemCount = $this->iAllItemCount + $oMainTree->iAllItemCount;
                $this->oChildCategoryTreeList->AddItem($oMainTree);
                $this->aContainingChildCategories[$oChildCategory->id] = $oChildCategory->GetName();
            }
        }
        if (empty($this->id)) {
            $this->id = TTools::GetUUID();
        }
    }
protected function LoadChildTreeExecute ( $ sChildCategoryId ) { $ sSelect = $ this -> GetQuery ( $ sChildCategoryId ) ; $ oChildCategoryList = TdbShopCategoryList :: GetList ( $ sSelect ) ; if ( $ oChildCategoryList -> Length ( ) > 1 ) { $ this -> oChildCategoryTreeList = new TIterator ( ) ; } while ( $ oChildCategory = $ oChildCategoryList -> Next ( ) ) { if ( $ oChildCategory -> id == $ sChildCategoryId ) { $ this -> oRealCategory = $ oChildCategory ; $ this -> iItemCount = 0 ; $ this -> iAllItemCount = 0 ; $ this -> id = $ oChildCategory -> id ; } else { $ oMainTree = new self ( ) ; $ oMainTree -> LoadChildTreeExecute ( $ oChildCategory -> id ) ; $ this -> aContainingChildCategories = array_merge ( $ this -> aContainingChildCategories , $ oMainTree -> aContainingChildCategories ) ; $ this -> iAllItemCount = $ this -> iAllItemCount + $ oMainTree -> iAllItemCount ; $ this -> oChildCategoryTreeList -> AddItem ( $ oMainTree ) ; $ this -> aContainingChildCategories [ $ oChildCategory -> id ] = $ oChildCategory -> GetName ( ) ; } } if ( empty ( $ this -> id ) ) { $ this -> id = TTools :: GetUUID ( ) ; } }
Loads Category tree from given master category id.

@param  $sChildCategoryId
Loads Category tree from given master category id .