function pager_get_query_parameters in Drupal 8
Same name and namespace in other branches
- 7 includes/pager.inc \pager_get_query_parameters()
Compose a URL query parameter array for pager links.
Return value
array A URL query parameter array that consists of all components of the current page request except for those pertaining to paging.
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead.
See also
https://www.drupal.org/node/2779457
\Drupal\Core\Pager\PagerParametersInterface::getQueryParameters()
1 call to pager_get_query_parameters()
- PagerDeprecationTest::testGetQueryParameters in core/
modules/ system/ tests/ src/ Kernel/ Pager/ PagerDeprecationTest.php - @expectedDeprecation pager_get_query_parameters is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457
File
- core/
includes/ pager.inc, line 158 - Functions to aid in presenting database results as a set of pages.
Code
function pager_get_query_parameters() {
@trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \\Drupal\\Core\\Pager\\PagerParametersInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
/* @var $pager_params \Drupal\Core\Pager\PagerParametersInterface */
$pager_params = \Drupal::service('pager.parameters');
return $pager_params
->getQueryParameters();
}