getAcl()->check($this->name, 'read')) { throw new Forbidden(); } $where = $request->get('where'); $parentId = $request->get('parentId'); $asc = $request->get('asc') === 'true'; $sortBy = $request->get('sortBy'); $collection = $this->getRecordService()->getTree($parentId, array( 'where' => $where, 'asc' => $asc, 'sortBy' => $sortBy, )); return array( 'list' => $collection->toArray(), 'path' => $this->getRecordService()->getTreeItemPath($parentId) ); } }