getMediaRelationRepository()->findAll($query); } public function findRelations(FindAllQuery $query): ResourceRelationCollection { $legacyQuery = new LegacyQuery( $query->getSourceId(), $query->getClassId() ); return $this->getMediaRelationRepository()->findAll($legacyQuery); } private function getMediaRelationRepository(): MediaRelationRepositoryInterface { return $this->getServiceLocator()->get(MediaRelationRepositoryInterface::SERVICE_ID); } }