Recommend this page to a friend! |
Classes of Ujah Chigozie peter | Peter PHP Pagination Class | README.md | Download |
|
DownloadPHP PaginationPagination is a simple package that can generate HTML to navigate between listing pages. It takes as parameter values the type of navigation to generate and the total number of entries in the listing. The class generates HTML with links to allow the user to click and go to the other listing pages considering the current listing page number. The class's navigation can be either a list of links or just a group of links pointing to each listing page. Developers can configure the presentation of the navigation using custom CSS styles or bootstrap pagination. InstallationInstallation is super-easy via Composer:
USAGESPagination can be used as an HTML hyperlink or HTML unordered list
Dump array
Use built-in css style, only work with
ConstantsInitalisation options | Options | Description | |-----------------|-------------------------------------------------------------------------------------| | LIST | Retrieve result as an html unordered list | | LINK | Retrieve result in HTML hyperlink | Methods| Method | Description |
|---------------------------|-------------------------------------------------------------------------------------|
| setLimit(int) | Set query row display limit per page |
| setCurrentPage(int) | Set current paging number |
| addQuery(string, string) | Add query parameter (key, value) |
| setQueries(array) | Set query parameters array(key => value) |
| setAllowCss(bool) | Enable default paging buttons styling |
| setClass(string) | Set a custom class name for paging list items Full usage exampleExample: Specify the total number of rows in your table
|