KnpLabs/KnpPaginatorBundle — pull request #176 by sepetrov (2013-04-15 11:19:48+00:00)
Title: added request subscriber to synchronize the sorting and/or filtration pa...

...rameters in $_GET with the Request object

This can be useful if you want to define default request parameters for sorting or filtering in the routing configuration. The problem is that knp-components works directly with the $_GET and expects the sorting and filtering parameters there, while the default parameters will only be available in the Request object.
Ideally the solution should be to change the subscribers in knp-pagination so they can be easily extended by knp-paginator-bundle where the parameters will be looked up in the Request object, but this is kind of a quick and dirty way of dealing with the problem.

This PR is BC and the default configuration does not "enable" this behaviour.

```yaml
Default configuration for "KnpPaginatorBundle"
knp_paginator:
default_options:
sort_field_name: sort
sort_direction_name: direction
filter_field_name: filterField
filter_value_name: filterValue
page_name: page
distinct: true

# List of $_GET parameters to be synchronized with the Request object parameters.
synced_request_params:
sort_param: false
sort_direction_param: false
filter_field_param: false
filter_value_param: false
template:
pagination: KnpPaginatorBundle:Pagination:sliding.html.twig
filtration: KnpPaginatorBundle:Pagination:filtration.html.twig
sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig
page_range: 5
```