Paginate

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\Paginate
Since
3.0

Paginate variable class.

View source

Public Properties

$currentPage

Signature

public  $currentPage = null

$first

Signature

public  $first = null

$last

Signature

public  $last = null

$total

Signature

public  $total = 0

$totalPages

Signature

public  $totalPages = 0

Public Methods

MethodDescription
getFirstUrl()Returns the URL to the first page.
getLastUrl()Returns the URL to the next page.
getNextUrl()Returns the URL to the next page.
getNextUrls()Returns next page URLs up to a certain distance from the current page.
getPageUrl()Returns the URL to a specific page
getPrevUrl()Returns the URL to the previous page.
getPrevUrls()Returns previous page URLs up to a certain distance from the current page.
getRangeUrls()Returns a range of page URLs.

getFirstUrl()

Returns the URL to the first page.

View source

Returns

string, null

Signature

public string, null getFirstUrl ( )

getLastUrl()

Returns the URL to the next page.

View source

Returns

string, null

Signature

public string, null getLastUrl ( )

getNextUrl()

Returns the URL to the next page.

View source

Returns

string, null

Signature

public string, null getNextUrl ( )

getNextUrls()

Returns next page URLs up to a certain distance from the current page.

View source

Arguments

Returns

array

Signature

public array getNextUrls ( \craft\web\twig\variables\int $dist = null )

getPageUrl()

Returns the URL to a specific page

View source

Arguments

Returns

string, null

Signature

public string, null getPageUrl ( \craft\web\twig\variables\int $page )

getPrevUrl()

Returns the URL to the previous page.

View source

Returns

string, null

Signature

public string, null getPrevUrl ( )

getPrevUrls()

Returns previous page URLs up to a certain distance from the current page.

View source

Arguments

Returns

array

Signature

public array getPrevUrls ( \craft\web\twig\variables\int $dist = null )

getRangeUrls()

Returns a range of page URLs.

View source

Arguments

Returns

array

Signature

public array getRangeUrls ( \craft\web\twig\variables\int $start, \craft\web\twig\variables\int $end )