Class craft\web\twig\variables\Paginate
- Inheritance
- craft\web\twig\variables\Paginate
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/web/twig/variables/Paginate.php
Paginate variable class.
Property | Type | Description | Defined By |
---|---|---|---|
$currentPage |
craft\web\twig\variables\Paginate | ||
$first |
craft\web\twig\variables\Paginate | ||
$last |
craft\web\twig\variables\Paginate | ||
$total |
craft\web\twig\variables\Paginate | ||
$totalPages |
craft\web\twig\variables\Paginate |
Method | Description | Defined By |
---|---|---|
getFirstUrl() |
Returns the URL to the first page. | craft\web\twig\variables\Paginate |
getLastUrl() |
Returns the URL to the next page. | craft\web\twig\variables\Paginate |
getNextUrl() |
Returns the URL to the next page. | craft\web\twig\variables\Paginate |
getNextUrls() |
Returns next page URLs up to a certain distance from the current page. | craft\web\twig\variables\Paginate |
getPageUrl() |
Returns the URL to a specific page | craft\web\twig\variables\Paginate |
getPrevUrl() |
Returns the URL to the previous page. | craft\web\twig\variables\Paginate |
getPrevUrls() |
Returns previous page URLs up to a certain distance from the current page. | craft\web\twig\variables\Paginate |
getRangeUrls() |
Returns a range of page URLs. | craft\web\twig\variables\Paginate |
Property Details
$currentPage
public property
#
public $currentPage = null
$first
public property
#
public $first = null
$last
public property
#
public $last = null
$total
public property
#
public $total = 0
$totalPages
public property
#
public $totalPages = 0
Method Details
getFirstUrl()
public method
#
Returns the URL to the first page.
public string, null getFirstUrl ( )
getLastUrl()
public method
#
Returns the URL to the next page.
public string, null getLastUrl ( )
getNextUrl()
public method
#
Returns the URL to the next page.
public string, null getNextUrl ( )
getNextUrls()
public method
#
Returns next page URLs up to a certain distance from the current page.
public array getNextUrls ( \craft\web\twig\variables\int $dist = null )
$dist |
integer, null |
getPageUrl()
public method
#
Returns the URL to a specific page
public string, null getPageUrl ( \craft\web\twig\variables\int $page )
$page |
integer |
getPrevUrl()
public method
#
Returns the URL to the previous page.
public string, null getPrevUrl ( )
getPrevUrls()
public method
#
Returns previous page URLs up to a certain distance from the current page.
public array getPrevUrls ( \craft\web\twig\variables\int $dist = null )
$dist |
integer, null |
getRangeUrls()
public method
#
Returns a range of page URLs.
public array getRangeUrls ( \craft\web\twig\variables\int $start, \craft\web\twig\variables\int $end )
$start |
integer | |
$end |
integer |