diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/RelationListIteratorAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/RelationListIteratorAdapter.php new file mode 100644 index 0000000000..38ee471fda --- /dev/null +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/RelationListIteratorAdapter.php @@ -0,0 +1,42 @@ +contentService->loadRelationList( + $this->versionInfo, + $offset, + $limit, + $this->relationType + )->getIterator(); + + if ($iterator instanceof Iterator) { + return $iterator; + } + + return new IteratorIterator($iterator); + } +}