protected function DataProviderEntity::defaultSortInfo in RESTful 7.2
Defines default sort fields if none are provided via the request URL.
Return value
array Array keyed by the public field name, and the order ('ASC' or 'DESC') as value.
1 call to DataProviderEntity::defaultSortInfo()
- DataProviderEntity::queryForListSort in src/
Plugin/ resource/ DataProvider/ DataProviderEntity.php - Sort the query for list.
File
- src/
Plugin/ resource/ DataProvider/ DataProviderEntity.php, line 154 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity.
Class
- DataProviderEntity
- Class DataProviderEntity.
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
protected function defaultSortInfo() {
return empty($this->options['sort']) ? array(
'id' => 'ASC',
) : $this->options['sort'];
}