public static function TableSort::getQueryParameters in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Utility/TableSort.php \Drupal\Core\Utility\TableSort::getQueryParameters()
- 10 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',
]);
}