Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenApiPaginator #562

Open
MasaKni opened this issue Nov 27, 2024 · 2 comments
Open

OpenApiPaginator #562

MasaKni opened this issue Nov 27, 2024 · 2 comments

Comments

@MasaKni
Copy link

MasaKni commented Nov 27, 2024

I was thinking about making the OpenApiPaginator accessible to be used on other methods that use pagination,
also adding a possibility to extend it and adding custom parameters, for instance i would like to add an order parameter that sorts by an array because currently it only allows sorting by one field.

so at least we would need the definePagination function to be protected

what do you think?

 protected function definePagination(): void
  {
      parent::definePagination();
      $this->pushOrderParameter();
  }

  private function pushOrderParameter()
  {
  }
@cnizzardini
Copy link
Owner

Yeah I think making paginator available on non-index methods is a good idea. When I originally developed this, given the amount of code necessary, only having it work on index() methods was a compromise. Unfortunately I haven't ever gotten around to it.

@MasaKni
Copy link
Author

MasaKni commented Dec 18, 2024

#563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants