function pager_get_query_parameters

Same name in other branches
  1. 7.x 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

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.