actionListTree($request->getRouteParams(), $request->getParsedBody(), $request); } $where = $request->getQueryParam('where'); $parentId = $request->getQueryParam('parentId'); $maxDepth = $request->getQueryParam('maxDepth'); $onlyNotEmpty = (bool) $request->getQueryParam('onlyNotEmpty'); $collection = $this->getRecordTreeService()->getTree( $parentId, [ 'where' => $where, 'onlyNotEmpty' => $onlyNotEmpty, ], $maxDepth ); return (object) [ 'list' => $collection->getValueMapList(), 'path' => $this->getRecordTreeService()->getTreeItemPath($parentId), 'data' => $this->getRecordTreeService()->getCategoryData($parentId), ]; } public function getActionLastChildrenIdList(Request $request): array { if (!$this->acl->check($this->name, 'read')) { throw new Forbidden(); } $parentId = $request->getQueryParam('parentId'); return $this->getRecordTreeService()->getLastChildrenIdList($parentId); } protected function getRecordTreeService(): Service { return $this->getRecordService(); } }