2

In several endpoints I'm doing with Apigility, I want retrieve all the possible results without pagination. Is there a class to replace Paginator in Collection?

Wilt
  • 41,477
  • 12
  • 152
  • 203
Manuel Rubio
  • 114
  • 2
  • 9

2 Answers2

2

To receive a response in Hal without pagination you should simply return an array from your queries instead of an instance of Zend\Paginator\Paginator.

Wilt
  • 41,477
  • 12
  • 152
  • 203
-2

For those who happen to find this question just as I did. You can edit the number of items per page in the module.config.php file. It's set as the value "page_size". Changing it to a number larger than the total amount in your collection will let you receive all the results in one page. Admittedly not the cleanest of solutions, but it worked for me.

Borje
  • 255
  • 5
  • 19