You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/pagination.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,8 @@ is returned. It's a valid JSON(-LD) document containing items of the requested p
16
16
{
17
17
"@context": "/contexts/Book",
18
18
"@id": "/books",
19
-
"@type": "hydra:Collection",
20
-
"hydra:member": [
19
+
"@type": "Collection",
20
+
"member": [
21
21
{
22
22
"@id": "/books/1",
23
23
"@type": "https://schema.org/Book",
@@ -27,13 +27,13 @@ is returned. It's a valid JSON(-LD) document containing items of the requested p
27
27
"_": "Other items in the collection..."
28
28
},
29
29
],
30
-
"hydra:totalItems": 50,
31
-
"hydra:view": {
30
+
"totalItems": 50,
31
+
"view": {
32
32
"@id": "/books?page=1",
33
-
"@type": "hydra:PartialCollectionView",
34
-
"hydra:first": "/books?page=1",
35
-
"hydra:last": "/books?page=2",
36
-
"hydra:next": "/books?page=2"
33
+
"@type": "PartialCollectionView",
34
+
"first": "/books?page=1",
35
+
"last": "/books?page=2",
36
+
"next": "/books?page=2"
37
37
}
38
38
}
39
39
```
@@ -308,7 +308,7 @@ class Book
308
308
## Partial Pagination
309
309
310
310
When using the default pagination, a `COUNT` query will be issued against the current requested collection. This may have a
311
-
performance impact on really big collections. The downside is that the information about the last page is lost (ie: `hydra:last`).
311
+
performance impact on really big collections. The downside is that the information about the last page is lost (ie: `last`).
312
312
313
313
### Partial Pagination Globally
314
314
@@ -454,7 +454,7 @@ For more information, please see the [Pagination](https://www.doctrine-project.o
454
454
455
455
## Custom Controller Action
456
456
457
-
In case you're using a custom controller action, make sure you return the `Paginator` object to get the full hydra response with `hydra:view` (which contains information about first, last, next and previous page). The following examples show how to handle it within a repository method.
457
+
In case you're using a custom controller action, make sure you return the `Paginator` object to get the full Hydra response with `view` (which contains information about first, last, next and previous page). The following examples show how to handle it within a repository method.
458
458
The controller needs to pass through the page number. You will need to use the Doctrine Paginator and pass it to the API Platform Paginator.
0 commit comments