KnpLabs/KnpPaginatorBundle — Issue #68: Add default items_per_page & page_range as a bundle parameter
Author: khepin
Created: 2011-12-13 08:00:06+00:00
State: open

Right now the Paginator's paginate function always has 10 as a default for items per page:

public function paginate($target, $page = 1, $limit = 10, $options = array())
{ ... }

Would be nice to be able to set your own default as a parameter of the bundle's configuration. Same for the page range

// File: app/configs/parameters.yml

parameters:
knp_paginator.template.pagination: MyBundle:Pagination:pagination.html.twig
knp_paginator.template.sortable: MyBundle:Pagination:sortable.html.twig
knp_paginator.paginator.items_per_page: 25
knp_paginator.paginator.page_range: 8