Paginate

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\Paginate ยป yii\base\BaseObject (opens new window)
Implements
yii\base\Configurable (opens new window)
Since
3.0.0

Paginate variable class.

View source (opens new window)

# Public Properties

# basePath

Type
string (opens new window)
Default value
null

View source (opens new window)

# currentPage

Type
integer (opens new window)
Default value
null

View source (opens new window)

# dynamicRangeUrls

Type
string (opens new window)[]
Default value
null
Access
Read-only

View source (opens new window)

# first

Type
integer (opens new window)
Default value
null

View source (opens new window)

# firstUrl

Type
string (opens new window), null (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# last

Type
integer (opens new window)
Default value
null

View source (opens new window)

# lastUrl

Type
string (opens new window), null (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# nextUrl

Type
string (opens new window), null (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# nextUrls

Type
array (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# prevUrl

Type
string (opens new window), null (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# prevUrls

Type
array (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# total

Type
integer (opens new window)
Default value
null

View source (opens new window)

# totalPages

Type
integer (opens new window)
Default value
null

View source (opens new window)

# Public Methods

Method Description
__call() (opens new window) Calls the named method which is not a class method.
__construct() (opens new window) Constructor.
__get() (opens new window) Returns the value of an object property.
__isset() (opens new window) Checks if a property is set, i.e. defined and not null.
__set() (opens new window) Sets value of an object property.
__unset() (opens new window) Sets an object property to null.
canGetProperty() (opens new window) Returns a value indicating whether a property can be read.
canSetProperty() (opens new window) Returns a value indicating whether a property can be set.
className() (opens new window) Returns the fully qualified name of this class.
create() Creates a new instance based on a Paginator object
getBasePath() Returns the base path that should be used for pagination URLs.
getDynamicRangeUrls() Returns a dynamic range of page URLs that surround (and include) the current page.
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.
hasMethod() (opens new window) Returns a value indicating whether a method is defined.
hasProperty() (opens new window) Returns a value indicating whether a property is defined.
init() (opens new window) Initializes the object.
setBasePath() Sets the base path that should be used for pagination URLs.

# create()

Since
3.1.19

Creates a new instance based on a Paginator object

View source (opens new window)

Arguments

Returns

static

# getBasePath()

Returns the base path that should be used for pagination URLs.

View source (opens new window)

Returns

string (opens new window)

# getDynamicRangeUrls()

Returns a dynamic range of page URLs that surround (and include) the current page.

View source (opens new window)

Arguments

Returns

string (opens new window)[]

# getFirstUrl()

Returns the URL to the first page.

View source (opens new window)

Returns

string (opens new window), null (opens new window)

# getLastUrl()

Returns the URL to the next page.

View source (opens new window)

Returns

string (opens new window), null (opens new window)

# getNextUrl()

Returns the URL to the next page.

View source (opens new window)

Returns

string (opens new window), null (opens new window)

# getNextUrls()

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

View source (opens new window)

Arguments

Returns

array (opens new window)

# getPageUrl()

Returns the URL to a specific page

View source (opens new window)

Arguments

Returns

string (opens new window), null (opens new window)

# getPrevUrl()

Returns the URL to the previous page.

View source (opens new window)

Returns

string (opens new window), null (opens new window)

# getPrevUrls()

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

View source (opens new window)

Arguments

Returns

array (opens new window)

# getRangeUrls()

Returns a range of page URLs.

View source (opens new window)

Arguments

Returns

string (opens new window)[]

# setBasePath()

Since
3.1.28

Sets the base path that should be used for pagination URLs.

View source (opens new window)

Arguments