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