Skip to content

Commit b719db6

Browse files
committed
Fix pagination for custom data providers
1 parent 5a03858 commit b719db6

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

core/pagination.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,12 @@ class BookRepository extends ServiceEntityRepository
543543
}
544544
```
545545

546-
## Pagination for Customer Data Providers
547-
548-
If you're using a customer Data Providers, and not the Doctrine ORM, ODM or
549-
ElasticSearch provides, then if you want your results to be paginated then
550-
you'll need to return an instance of a
551-
`\ApiPlatform\Core\DataProvider\PartialPaginatorInterface` or
552-
`\ApiPlatform\Core\DataProvider\PaginatorInterface`. A few existing classes are
553-
provided to get you started with these…
554-
555-
* `\ApiPlatform\Core\DataProvider\ArrayPaginator`
556-
* `\ApiPlatform\Core\DataProvider\TraversablePaginator`
546+
## Pagination for Custom Data Providers
547+
548+
If you are using custom data providers (not the provided Doctrine ORM, ODM or ElasticSearch ones)
549+
and if you want your results to be paginated, you will need to return an instance of a
550+
`ApiPlatform\Core\DataProvider\PartialPaginatorInterface` or
551+
`ApiPlatform\Core\DataProvider\PaginatorInterface`.
552+
A few existing classes are provided to make it easier to paginate the results:
553+
* `ApiPlatform\Core\DataProvider\ArrayPaginator`
554+
* `ApiPlatform\Core\DataProvider\TraversablePaginator`

0 commit comments

Comments
 (0)