Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nobletsolutions/filteredpaginationbundle
https://github.com/nobletsolutions/filteredpaginationbundle
bundle php symfony symfony-bundle
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nobletsolutions/filteredpaginationbundle
- Owner: NobletSolutions
- Created: 2015-09-08T19:53:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T05:16:24.000Z (2 months ago)
- Last Synced: 2024-10-20T18:10:59.281Z (27 days ago)
- Topics: bundle, php, symfony, symfony-bundle
- Language: PHP
- Size: 80.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
Installation
============composer require ns/filtered-pagination-bundle
Edit AppKernel.php and add the bundle
...
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
new NS\FilteredPaginationBundle\NSFilteredPaginationBundle(),Usage
============In a controller you request the filtered pagination bundle.
$query = $this->get('doctrine.orm.entity_manager')->getRepository('...')->getSomeQuery();
$filteredPaginator = $this->get('ns.filtered_pagination');
list($form, $pagination, $redirect) = $filteredPaginator->process($request, $formType, $query, 'sessionKey');if ($redirect) {
return $this->redirect($this->generateUrl('practiceUsers'));
}Limit Select
============You can use the provided LimitSelectType to provide a 'X' results per page selector. If you do so
you should include the main.js resource which handles detecting changes to the number per page.