organizationRepository->getFederationStructureByOrganizationId($id); } public function getCollection(string $resourceClass, string $operationName = null): ArrayCollection { $request = $this->requestStack->getCurrentRequest(); if ($request === null) { throw new \RuntimeException('Undefined request'); } $parentId = $request->query->get('parent'); if (empty($parentId) || !is_numeric($parentId)) { throw new \RuntimeException('Bad or missing parent value'); } return new ArrayCollection($this->organizationRepository->getChildrenStructuresByFederationId($parentId)); } }