public function getOtherMenus() { $root = Category::model()->root(); $root->dbCriteria->mergeWith(array('condition'=>'alias!="main"')); $roots = $root->children()->findAll(); $res = array(); foreach ($roots as $root) { $res[] = array( 'text' => ModelFactory::adminViewCategoryLink($root), 'children' => $this->getTree($root) ); } return $res; }