Skip to content

Commit 4ac4481

Browse files
committed
feat: allow pageLength to be customised for returnPaginated() api
1 parent d7327a2 commit 4ac4481

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Controllers/ApiController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ public function failure(array $context = [])
117117
*
118118
* @return HTTPResponse
119119
*/
120-
public function returnPaginated(SS_List $list, $keyFunc = null, $dataFunc = null)
120+
public function returnPaginated(SS_List $list, $keyFunc = null, $dataFunc = null, $pageLength = 100)
121121
{
122-
list($list, $output) = $this->prepPaginatedOutput($list, $keyFunc, $dataFunc);
122+
list($list, $output) = $this->prepPaginatedOutput($list, $keyFunc, $dataFunc, $pageLength);
123123

124124
return $this->returnArray([
125125
'records' => $output,

0 commit comments

Comments
 (0)