class UrlWindow

Properties

protected LengthAwarePaginator $paginator

The paginator implementation.

Methods

void
__construct(LengthAwarePaginator $paginator)

Create a new URL window instance.

static array
make(LengthAwarePaginator $paginator, int $onEachSide = 3)

Create a new URL window instance.

array
get(int $onEachSide = 3)

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

at line 22
void __construct(LengthAwarePaginator $paginator)

Create a new URL window instance.

Parameters

LengthAwarePaginator $paginator

Return Value

void

at line 34
static array make(LengthAwarePaginator $paginator, int $onEachSide = 3)

Create a new URL window instance.

Parameters

LengthAwarePaginator $paginator
int $onEachSide

Return Value

array

at line 45
array get(int $onEachSide = 3)

Get the window of URLs to be shown.

Parameters

int $onEachSide

Return Value

array

at line 59
protected array getSmallSlider()

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

Return Value

array

at line 74
protected array getUrlSlider(int $onEachSide)

Create a URL slider links.

Parameters

int $onEachSide

Return Value

array

at line 108
protected array getSliderTooCloseToBeginning(int $window)

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

Parameters

int $window

Return Value

array

at line 123
protected array getSliderTooCloseToEnding(int $window)

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

Parameters

int $window

Return Value

array

at line 143
protected array getFullSlider(int $onEachSide)

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

Parameters

int $onEachSide

Return Value

array

at line 158
array getAdjacentUrlRange(int $onEachSide)

Get the page range for the current page window.

Parameters

int $onEachSide

Return Value

array

at line 171
array getStart()

Get the starting URLs of a pagination slider.

Return Value

array

at line 181
array getFinish()

Get the ending URLs of a pagination slider.

Return Value

array

at line 194
bool hasPages()

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

Return Value

bool

at line 204
protected int currentPage()

Get the current page from the paginator.

Return Value

int

at line 214
protected int lastPage()

Get the last page from the paginator.

Return Value

int