function TableSort::getQueryParameters
Same name in other branches
- 7.x includes/tablesort.inc \TableSort::getQueryParameters()
- 9 core/lib/Drupal/Core/Utility/TableSort.php \Drupal\Core\Utility\TableSort::getQueryParameters()
- 8.9.x core/lib/Drupal/Core/Utility/TableSort.php \Drupal\Core\Utility\TableSort::getQueryParameters()
- 11.x core/lib/Drupal/Core/Utility/TableSort.php \Drupal\Core\Utility\TableSort::getQueryParameters()
Composes a URL query parameter array for table sorting links.
@internal
Parameters
\Symfony\Component\HttpFoundation\Request|null $request: A current request.
Return value
array A URL query parameter array that consists of all components of the current page request except for those pertaining to table sorting.
2 calls to TableSort::getQueryParameters()
- TableSort::getContextFromRequest in core/
lib/ Drupal/ Core/ Utility/ TableSort.php - Initializes the table sort context.
- template_preprocess_views_view_table in core/
modules/ views/ views.theme.inc - Prepares variables for views table templates.
File
-
core/
lib/ Drupal/ Core/ Utility/ TableSort.php, line 179
Class
- TableSort
- Provides a class for table sorting processing and rendering.
Namespace
Drupal\Core\UtilityCode
public static function getQueryParameters(Request $request) {
return UrlHelper::filterQueryParameters($request->query
->all(), [
'sort',
'order',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.