PHP Class Landish\Pagination\Pagination

Inheritance: extends PaginationHTML, implements Illuminate\Contracts\Pagination\Presenter, use trait Illuminate\Pagination\UrlWindowPresenterTrait
Show file Open project: landish/pagination Class Usage Examples

Protected Properties

Property Type Description
$paginator Illuminate\Contracts\Pagination\Paginator The paginator implementation.
$window array The URL window data structure.

Public Methods

Method Description
__construct ( Illuminate\Contracts\Pagination\Paginator $paginator, Illuminate\Pagination\UrlWindow $window = null ) Create a new Pagination presenter instance.
hasPages ( ) : boolean Determine if the underlying paginator being presented has pages to show.
render ( ) : string Convert the URL window into Pagination HTML.

Protected Methods

Method Description
currentPage ( ) : integer Get the current page from the paginator.
getActivePageWrapper ( string $text ) : string Get HTML wrapper for active text.
getAvailablePageWrapper ( string $url, integer $page ) : string Get HTML wrapper for an available page link.
getDisabledTextWrapper ( string $text ) : string Get HTML wrapper for disabled text.
getDots ( ) : string Get a pagination "dot" element.
getNextButton ( ) : string Get the next page pagination element.
getPageLinkWrapper ( string $url, integer $page ) : string Get HTML wrapper for a page link.
getPreviousButton ( ) : string Get the previous page pagination element.
lastPage ( ) : integer Get the last page from the paginator.

Method Details

__construct() public method

Create a new Pagination presenter instance.
public __construct ( Illuminate\Contracts\Pagination\Paginator $paginator, Illuminate\Pagination\UrlWindow $window = null )
$paginator Illuminate\Contracts\Pagination\Paginator
$window Illuminate\Pagination\UrlWindow

currentPage() protected method

Get the current page from the paginator.
protected currentPage ( ) : integer
return integer

getActivePageWrapper() protected method

Get HTML wrapper for active text.
protected getActivePageWrapper ( string $text ) : string
$text string
return string

getAvailablePageWrapper() protected method

Get HTML wrapper for an available page link.
protected getAvailablePageWrapper ( string $url, integer $page ) : string
$url string
$page integer
return string

getDisabledTextWrapper() protected method

Get HTML wrapper for disabled text.
protected getDisabledTextWrapper ( string $text ) : string
$text string
return string

getDots() protected method

Get a pagination "dot" element.
protected getDots ( ) : string
return string

getNextButton() protected method

Get the next page pagination element.
protected getNextButton ( ) : string
return string

getPreviousButton() protected method

Get the previous page pagination element.
protected getPreviousButton ( ) : string
return string

hasPages() public method

Determine if the underlying paginator being presented has pages to show.
public hasPages ( ) : boolean
return boolean

lastPage() protected method

Get the last page from the paginator.
protected lastPage ( ) : integer
return integer

render() public method

Convert the URL window into Pagination HTML.
public render ( ) : string
return string

Property Details

$paginator protected property

The paginator implementation.
protected Paginator,Illuminate\Contracts\Pagination $paginator
return Illuminate\Contracts\Pagination\Paginator

$window protected property

The URL window data structure.
protected array $window
return array