Paginate

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\Paginate ยป yii\base\BaseObject
Implements
yii\base\Configurable
Since
3.0.0

Paginate variable class.

View source

# Public Properties

# basePath

Type
string

View source

# currentPage

Type
integer

View source

# dynamicRangeUrls

Type
string[]
Access
Read-only

View source

# first

Type
integer

View source

# firstUrl

Type
string, null
Access
Read-only

View source

# last

Type
integer

View source

# lastUrl

Type
string, null
Access
Read-only

View source

# nextUrl

Type
string, null
Access
Read-only

View source

# nextUrls

Type
array
Access
Read-only

View source

# prevUrl

Type
string, null
Access
Read-only

View source

# prevUrls

Type
array
Access
Read-only

View source

# total

Type
integer

View source

# totalPages

Type
integer

View source

# Public Methods

Method Description
__call() Calls the named method which is not a class method.
__construct() Constructor.
__get() Returns the value of an object property.
__isset() Checks if a property is set, i.e. defined and not null.
__set() Sets value of an object property.
__unset() Sets an object property to null.
canGetProperty() Returns a value indicating whether a property can be read.
canSetProperty() Returns a value indicating whether a property can be set.
className() 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() Returns a value indicating whether a method is defined.
hasProperty() Returns a value indicating whether a property is defined.
init() 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

Arguments

Returns

static

# getBasePath()

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

View source

Returns

string

# getDynamicRangeUrls()

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

View source

Arguments

  • $max (integer) โ€“ The maximum number of links to return

Returns

string[]

# getFirstUrl()

Returns the URL to the first page.

View source

Returns

string, null

# getLastUrl()

Returns the URL to the next page.

View source

Returns

string, null

# getNextUrl()

Returns the URL to the next page.

View source

Returns

string, null

# getNextUrls()

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

View source

Arguments

Returns

array

# getPageUrl()

Returns the URL to a specific page

View source

Arguments

Returns

string, null

# getPrevUrl()

Returns the URL to the previous page.

View source

Returns

string, null

# getPrevUrls()

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

View source

Arguments

Returns

array

# getRangeUrls()

Returns a range of page URLs.

View source

Arguments

Returns

string[]

# setBasePath()

Since
3.1.28

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

View source

Arguments