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.
Public Properties ​
basePath
​
- Type
- string
- Default value
null
currentPage
​
- Type
- integer
- Default value
null
dynamicRangeUrls
​
- Type
- string[]
- Default value
null
- Access
- Read-only
first
​
- Type
- integer
- Default value
null
firstUrl
​
last
​
- Type
- integer
- Default value
null
lastUrl
​
nextUrl
​
nextUrls
​
- Type
- array
- Default value
null
- Access
- Read-only
pageTrigger
​
- Type
- string
- Default value
null
- Since
- 3.7.64
prevUrl
​
prevUrls
​
- Type
- array
- Default value
null
- Access
- Read-only
total
​
- Type
- integer
- Default value
0
totalPages
​
- Type
- integer
- Default value
0
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
Arguments ​
$paginator
(craft\db\Paginator)
Returns ​
static
getBasePath()
​
Returns the base path that should be used for pagination URLs.
Returns ​
getDynamicRangeUrls()
​
Returns a dynamic range of page URLs that surround (and include) the current page.
Arguments ​
$max
(integer) – The maximum number of links to return
Returns ​
string[]
getFirstUrl()
​
Returns the URL to the first page.
Returns ​
getLastUrl()
​
Returns the URL to the next page.
Returns ​
getNextUrl()
​
Returns the URL to the next page.
Returns ​
getNextUrls()
​
Returns next page URLs up to a certain distance from the current page.
Arguments ​
Returns ​
getPageUrl()
​
Returns the URL to a specific page
Arguments ​
$page
(integer)
Returns ​
getPrevUrl()
​
Returns the URL to the previous page.
Returns ​
getPrevUrls()
​
Returns previous page URLs up to a certain distance from the current page.
Arguments ​
Returns ​
getRangeUrls()
​
Returns a range of page URLs.
Arguments ​
Returns ​
string[]
init()
​
Initializes the object.
This method is invoked at the end of the constructor after the object is initialized with the given configuration.
setBasePath()
​
- Since
- 3.1.28
Sets the base path that should be used for pagination URLs.
Arguments ​
$basePath
(string)