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

Source of parameters: sort, direction, filter* #728

Open
sittelle opened this issue Feb 10, 2022 · 1 comment
Open

Source of parameters: sort, direction, filter* #728

sittelle opened this issue Feb 10, 2022 · 1 comment

Comments

@sittelle
Copy link

sittelle commented Feb 10, 2022

Bundle version ^5.8
Symfony version 5.4

Support Question

KNP Paginator Bundle heavily relies on Symfony's Request (mostly "->query") object. I would like to step away from this and integrate a mechanism to supply the whole Bundle with something like a UserDefinedRequest - which supplies the Bundle (meaning every class that relies on Symfony's Request object) with all necessary functions (mainly those supported by InputBag). This way, the application can specify where the parameters come from (other than the Request->query object).

Why? Just one example: currently, URLs look like ?sort=a.fancy_title, but i do not whant to show everybody the table column names, instead I would like to set up a URL like ?sort=title and map the value title in the controller to a.fancy_title and pass it to Paginator.

Is this already possible? If not: how can I archieve this?

Thanks in advance
Gregor

@garak
Copy link
Collaborator

garak commented Feb 12, 2022

I'm afraid this is not currently supported.

It would be nice to have it, since the current implementation is a bit too naive.
Anyway, it should be done in the knp_components library

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

No branches or pull requests

2 participants