function Sort::__construct
Same name in other branches
- 8.9.x core/modules/jsonapi/src/Query/Sort.php \Drupal\jsonapi\Query\Sort::__construct()
- 10 core/modules/jsonapi/src/Query/Sort.php \Drupal\jsonapi\Query\Sort::__construct()
- 11.x core/modules/jsonapi/src/Query/Sort.php \Drupal\jsonapi\Query\Sort::__construct()
Constructs a new Sort object.
Takes an array of sort fields. Example: [ [ 'path' => 'changed', 'direction' => 'DESC', ], [ 'path' => 'title', 'direction' => 'ASC', 'langcode' => 'en-US', ], ]
Parameters
array $fields: The entity query sort fields.
File
-
core/
modules/ jsonapi/ src/ Query/ Sort.php, line 73
Class
- Sort
- Gathers information about the sort parameter.
Namespace
Drupal\jsonapi\QueryCode
public function __construct(array $fields) {
$this->fields = $fields;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.