@@ -21,15 +21,25 @@ final class PaginationOptions
21
21
private $ itemsPerPageParameterName ;
22
22
private $ paginationClientEnabled ;
23
23
private $ paginationClientEnabledParameterName ;
24
+ private $ itemsPerPage ;
25
+ private $ maximumItemsPerPage ;
26
+ private $ partialPaginationEnabled ;
27
+ private $ clientPartialPaginationEnabled ;
28
+ private $ partialPaginationParameterName ;
24
29
25
- public function __construct (bool $ paginationEnabled = true , string $ paginationPageParameterName = 'page ' , bool $ clientItemsPerPage = false , string $ itemsPerPageParameterName = 'itemsPerPage ' , bool $ paginationClientEnabled = false , string $ paginationClientEnabledParameterName = 'pagination ' )
30
+ public function __construct (bool $ paginationEnabled = true , string $ paginationPageParameterName = 'page ' , bool $ clientItemsPerPage = false , string $ itemsPerPageParameterName = 'itemsPerPage ' , bool $ paginationClientEnabled = false , string $ paginationClientEnabledParameterName = 'pagination ' , int $ itemsPerPage = 30 , int $ maximumItemsPerPage = null , bool $ partialPaginationEnabled = false , bool $ clientPartialPaginationEnabled = false , string $ partialPaginationParameterName = ' partial ' )
26
31
{
27
32
$ this ->paginationEnabled = $ paginationEnabled ;
28
33
$ this ->paginationPageParameterName = $ paginationPageParameterName ;
29
34
$ this ->clientItemsPerPage = $ clientItemsPerPage ;
30
35
$ this ->itemsPerPageParameterName = $ itemsPerPageParameterName ;
31
36
$ this ->paginationClientEnabled = $ paginationClientEnabled ;
32
37
$ this ->paginationClientEnabledParameterName = $ paginationClientEnabledParameterName ;
38
+ $ this ->itemsPerPage = $ itemsPerPage ;
39
+ $ this ->maximumItemsPerPage = $ maximumItemsPerPage ;
40
+ $ this ->partialPaginationEnabled = $ partialPaginationEnabled ;
41
+ $ this ->clientPartialPaginationEnabled = $ clientPartialPaginationEnabled ;
42
+ $ this ->partialPaginationParameterName = $ partialPaginationParameterName ;
33
43
}
34
44
35
45
public function isPaginationEnabled (): bool
@@ -57,8 +67,38 @@ public function getPaginationClientEnabled(): bool
57
67
return $ this ->paginationClientEnabled ;
58
68
}
59
69
70
+ public function isPaginationClientEnabled (): bool
71
+ {
72
+ return $ this ->paginationClientEnabled ;
73
+ }
74
+
60
75
public function getPaginationClientEnabledParameterName (): string
61
76
{
62
77
return $ this ->paginationClientEnabledParameterName ;
63
78
}
79
+
80
+ public function getItemsPerPage (): int
81
+ {
82
+ return $ this ->itemsPerPage ;
83
+ }
84
+
85
+ public function getMaximumItemsPerPage (): int
86
+ {
87
+ return $ this ->maximumItemsPerPage ;
88
+ }
89
+
90
+ public function isPartialPaginationEnabled (): bool
91
+ {
92
+ return $ this ->partialPaginationEnabled ;
93
+ }
94
+
95
+ public function isClientPartialPaginationEnabled (): bool
96
+ {
97
+ return $ this ->clientPartialPaginationEnabled ;
98
+ }
99
+
100
+ public function getPartialPaginationParameterName (): string
101
+ {
102
+ return $ this ->partialPaginationParameterName ;
103
+ }
64
104
}
0 commit comments