source/Application/Model/Category.php
public function setSubCats($aCats)
    {
        $this->_aSubCats = $aCats;

        foreach ($aCats as $oCat) {
            // keeping ref. to parent
            $oCat->setParentCategory($this);

            if ($oCat->getIsVisible()) {
                $this->setHasVisibleSubCats(true);
            }
        }
    }
public function setSubCats($aCats)
    {
        $this->_aSubCats = $aCats;

        foreach ($aCats as $oCat) {
            // keeping ref. to parent
            $oCat->setParentCategory($this);

            if ($oCat->getIsVisible()) {
                $this->setHasVisibleSubCats(true);
            }
        }
    }
public function setSubCats ( $ aCats ) { $ this -> _aSubCats = $ aCats ; foreach ( $ aCats as $ oCat ) { // keeping ref. to parent $ oCat -> setParentCategory ( $ this ) ; if ( $ oCat -> getIsVisible ( ) ) { $ this -> setHasVisibleSubCats ( true ) ; } } }
Sets an array of sub categories, also handles parent hasVisibleSubCats

@param array $aCats array of categories
Sets an array of sub categories also handles parent hasVisibleSubCats