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)
# pageTrigger
- Type
- string (opens new window)
- Default value
null
- Since
- 3.7.64
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
0
View source (opens new window)
# totalPages
- Type
- integer (opens new window)
- Default value
0
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() | 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
$paginator
(craft\db\Paginator)
Returns
static
# getBasePath()
Returns the base path that should be used for pagination URLs.
View source (opens new window)
Returns
# getDynamicRangeUrls()
Returns a dynamic range of page URLs that surround (and include) the current page.
View source (opens new window)
Arguments
$max
(integer (opens new window)) โ The maximum number of links to return
Returns
# 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
# getPageUrl()
Returns the URL to a specific page
View source (opens new window)
Arguments
$page
(integer (opens new window))
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
# getRangeUrls()
Returns a range of page URLs.
View source (opens new window)
Arguments
$start
(integer (opens new window))$end
(integer (opens new window))
Returns
# init()
Initializes the object.
This method is invoked at the end of the constructor after the object is initialized with the given configuration.
View source (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
$basePath
(string (opens new window))