public function Sort::__construct in Drupal 8
Same name and namespace in other branches
- 9 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;
}