public function Pagerer::getHref in Pagerer 8
Gets a pager link.
Parameters
array $parameters: An associative array of query string parameters to append to the pager links.
int $page: The target page.
string $adaptive_keys: The adaptive keys string, 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.
bool $set_query: Whether the link should contain the query parameters.
Return value
\Drupal\Core\Url The Url object for the link.
Overrides PagererInterface::getHref
File
- src/
Pagerer.php, line 265
Class
- Pagerer
- Pagerer pager management class.
Namespace
Drupal\pagererCode
public function getHref(array $parameters, $page, $adaptive_keys = NULL, $set_query = TRUE) {
$options = $set_query ? [
'query' => $this
->getQueryParameters($parameters, $page, $adaptive_keys),
] : [];
return Url::fromRoute($this
->getRouteName(), $this
->getRouteParameters(), $options);
}