PHP Class Msieprawski\ResourceTable\Presenters\DefaultPresenter

Inheritance: implements Illuminate\Contracts\Pagination\Presenter, use trait Illuminate\Pagination\UrlWindowPresenterTrait
Datei anzeigen Open project: msieprawski/resource-table

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 ) : void Create a new Bootstrap presenter instance.
hasPages ( ) : boolean Determine if the underlying paginator being presented has pages to show.
render ( ) : string Convert the URL window into Bootstrap 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 | null $rel = null ) : 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 $text = '»' ) : string Get the next page pagination element.
getPreviousButton ( string $text = '«' ) : string Get the previous page pagination element.
lastPage ( ) : integer Get the last page from the paginator.

Method Details

__construct() public method

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

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 | null $rel = null ) : string
$url string
$page integer
$rel string | null
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 $text = '»' ) : string
$text string
return string

getPreviousButton() protected method

Get the previous page pagination element.
protected getPreviousButton ( string $text = '«' ) : string
$text 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 Bootstrap HTML.
public render ( ) : string
return string

Property Details

$paginator protected_oe property

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

$window protected_oe property

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