Componette

Componette

premekkoch

premekkoch / PkPaginator 0.0.2

Nette Framework extended paginator with different items count on first page

download-cloud-line composer require premekkoch/pkpaginator

PremekKoch\PkPaginator

Extended Nette framework paginator, which allows different items count on first page.

Instalation

composer require premekkoch/pkpaginator

How to use

Use PkPaginator instead of Nette\Utils\Paginator by the same way. For different items count on first page, set this count by calling setItemsOnFirstPage();. If you don't do this, PkPaginator works with original behavior of Nette\Utils\Paginator with same items count on each page.

	$paginator = new PremekKoch\PkPaginator();
	$paginator->setItemCount(356); // total number of items
	$paginator->setItemsOnFirstPage(5); // items count on first page
	$paginator->setItemsPerPage(30); // items per 2nd and next pages
	$paginator->setPage(1); // actual page number
bar-chart-fill

Statistics

download-cloud-fill
24
star-fill
0
bug-fill
0
flashlight-fill
5.2y
price-tag-2-line

Badges

guide-fill

Dependencies

php (>=5.4)
Componette Componette felix@nette.org