UrlWindow

class UrlWindow (View source)

Properties

protected LengthAwarePaginator $paginator The paginator implementation.

Methods

void __construct(LengthAwarePaginator $paginator)

Create a new URL window instance.

static array make(LengthAwarePaginator $paginator)

Create a new URL window instance.

array get()

Get the window of URLs to be shown.

array getSmallSlider()

Get the slider of URLs there are not enough pages to slide.

array getUrlSlider(int $onEachSide)

Create a URL slider links.

array getSliderTooCloseToBeginning(int $window)

Get the slider of URLs when too close to beginning of window.

array getSliderTooCloseToEnding(int $window)

Get the slider of URLs when too close to ending of window.

array getFullSlider(int $onEachSide)

Get the slider of URLs when a full slider can be made.

array getAdjacentUrlRange(int $onEachSide)

Get the page range for the current page window.

array getStart()

Get the starting URLs of a pagination slider.

array getFinish()

Get the ending URLs of a pagination slider.

bool hasPages()

Determine if the underlying paginator being presented has pages to show.

int currentPage()

Get the current page from the paginator.

int lastPage()

Get the last page from the paginator.

Details

void __construct(LengthAwarePaginator $paginator)

Create a new URL window instance.

Parameters

LengthAwarePaginator $paginator

Return Value

void

static array make(LengthAwarePaginator $paginator)

Create a new URL window instance.

Parameters

LengthAwarePaginator $paginator

Return Value

array

array get()

Get the window of URLs to be shown.

Return Value

array

protected array getSmallSlider()

Get the slider of URLs there are not enough pages to slide.

Return Value

array

protected array getUrlSlider(int $onEachSide)

Create a URL slider links.

Parameters

int $onEachSide

Return Value

array

protected array getSliderTooCloseToBeginning(int $window)

Get the slider of URLs when too close to beginning of window.

Parameters

int $window

Return Value

array

protected array getSliderTooCloseToEnding(int $window)

Get the slider of URLs when too close to ending of window.

Parameters

int $window

Return Value

array

protected array getFullSlider(int $onEachSide)

Get the slider of URLs when a full slider can be made.

Parameters

int $onEachSide

Return Value

array

array getAdjacentUrlRange(int $onEachSide)

Get the page range for the current page window.

Parameters

int $onEachSide

Return Value

array

array getStart()

Get the starting URLs of a pagination slider.

Return Value

array

array getFinish()

Get the ending URLs of a pagination slider.

Return Value

array

bool hasPages()

Determine if the underlying paginator being presented has pages to show.

Return Value

bool

protected int currentPage()

Get the current page from the paginator.

Return Value

int

protected int lastPage()

Get the last page from the paginator.

Return Value

int

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/6.x/Illuminate/Pagination/UrlWindow.html