public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null) { if ($this->orderBy === null) { $this->orderBy = KalturaCategoryOrderBy::DEPTH_ASC; } $categoryFilter = $this->toObject(); $c = KalturaCriteria::create(categoryPeer::OM_CLASS); $categoryFilter->attachToCriteria($c); $pager->attachToCriteria($c); $dbList = categoryPeer::doSelect($c); $totalCount = $c->getRecordsCount(); $list = KalturaCategoryArray::fromDbArray($dbList, $responseProfile); $response = new KalturaCategoryListResponse(); $response->objects = $list; $response->totalCount = $totalCount; return $response; }