class Pagerer in Pagerer 8.2
Same name in this branch
- 8.2 src/Pagerer.php \Drupal\pagerer\Pagerer
- 8.2 src/Plugin/views/pager/Pagerer.php \Drupal\pagerer\Plugin\views\pager\Pagerer
Same name and namespace in other branches
- 8 src/Pagerer.php \Drupal\pagerer\Pagerer
Pagerer pager value object.
Hierarchy
Expanded class hierarchy of Pagerer
3 files declare their use of Pagerer
- Multipane.php in src/
Plugin/ pagerer/ Multipane.php - PagererStyleBase.php in src/
Plugin/ pagerer/ PagererStyleBase.php - PagererStyleInterface.php in src/
Plugin/ PagererStyleInterface.php
3 string references to 'Pagerer'
File
- src/
Pagerer.php, line 10
Namespace
Drupal\pagererView source
class Pagerer extends Pager {
/**
* The pager element.
*
* This is the index used by query extenders to identify the query to be
* paged, and reflected in the 'page=x,y,z' query parameter of the HTTP
* request.
*
* @var int
*/
protected $element;
/**
* The route name.
*
* @var string
*/
protected $routeName;
/**
* The route parameters.
*
* @var string[]
*/
protected $routeParameters = [];
/**
* The pager adaptive keys.
*
* @var string
*/
protected $adaptiveKeys;
/**
* Gets the route name for this pager.
*
* @return string
* The route name.
*/
public function getRouteName() {
return $this->routeName;
}
/**
* Sets the route name for this pager.
*
* @param string $route_name
* The route name.
*
* @return self
* Self.
*/
public function setRouteName($route_name) : self {
$this->routeName = $route_name;
return $this;
}
/**
* Gets the route parameters for this pager.
*
* @return string[]
* The route parameters.
*/
public function getRouteParameters() : array {
return $this->routeParameters;
}
/**
* Sets the route parameters for this pager.
*
* @param string[] $route_parameters
* The route parameters.
*
* @return self
* Self.
*/
public function setRouteParameters(array $route_parameters) : self {
$this->routeParameters = $route_parameters;
return $this;
}
/**
* Gets the pager element.
*
* @return int
* The pager element.
*/
public function getElement() : int {
return $this->element;
}
/**
* Sets the pager element.
*
* @param int $element
* The pager element.
*
* @return self
* Self.
*/
public function setElement(int $element) : self {
$this->element = $element;
return $this;
}
/**
* Gets last page in the pager (zero-index).
*
* @return int
* The index of the last page in the pager.
*/
public function getLastPage() : int {
return $this->totalPages - 1;
}
/**
* Gets the adaptive keys of this pager.
*
* Used by the Adaptive pager style.
*
* @return array
* The adaptive keys array, in the format 'L,R,X', where L is the
* adaptive lock to left page, R is the adaptive lock to right page,
* and X is the adaptive center lock for calculation of neighborhood.
*/
public function getAdaptiveKeys() : array {
return $this->adaptiveKeys;
}
/**
* Sets the adaptive keys of this pager.
*
* Used by the Adaptive pager style.
*
* @param array $adaptive_keys
* The adaptive keys array, in the format 'L,R,X', where L is the adaptive
* lock to left page, R is the adaptive lock to right page, and X is the
* adaptive center lock for calculation of neighborhood.
*
* @return self
* Self.
*/
public function setAdaptiveKeys(array $adaptive_keys) : self {
$this->adaptiveKeys = $adaptive_keys;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Pager:: |
protected | property | The current page of the pager. | |
Pager:: |
protected | property | The maximum number of items per page. | |
Pager:: |
protected | property | The total number of items . | |
Pager:: |
protected | property | The total number of pages. | |
Pager:: |
public | function | Gets the current page. | |
Pager:: |
public | function | Gets the maximum number of items per page. | |
Pager:: |
public | function | Gets the total number of items. | |
Pager:: |
public | function | Gets the total number of pages. | |
Pager:: |
protected | function | Sets the current page to a valid value within range. | |
Pager:: |
protected | function | Sets the total number of pages. | |
Pager:: |
public | function | Pager constructor. | |
Pagerer:: |
protected | property | The pager adaptive keys. | |
Pagerer:: |
protected | property | The pager element. | |
Pagerer:: |
protected | property | The route name. | |
Pagerer:: |
protected | property | The route parameters. | |
Pagerer:: |
public | function | Gets the adaptive keys of this pager. | |
Pagerer:: |
public | function | Gets the pager element. | |
Pagerer:: |
public | function | Gets last page in the pager (zero-index). | |
Pagerer:: |
public | function | Gets the route name for this pager. | |
Pagerer:: |
public | function | Gets the route parameters for this pager. | |
Pagerer:: |
public | function | Sets the adaptive keys of this pager. | |
Pagerer:: |
public | function | Sets the pager element. | |
Pagerer:: |
public | function | Sets the route name for this pager. | |
Pagerer:: |
public | function | Sets the route parameters for this pager. |