abstract public function entity_views_example_query::add_selector_orderby in Entity API 7
Add a sort to the query.
This is used to add a sort based on an Entity API data selector instead of a field alias.
This method has to be present if click-sorting on fields should be allowed for some fields using the default Entity API field handlers.
Parameters
$selector: The field to sort on, as an Entity API data selector.
$order: The order to sort items in - either 'ASC' or 'DESC'. Defaults to 'ASC'.
File
- views/
entity_views_example_query.php, line 36 - Contains an example for a Views query plugin that could use the data selection tables.
Class
- entity_views_example_query
- Describes the additional methods looked for on a query plugin if data selection based tables or fields are used.
Code
public abstract function add_selector_orderby($selector, $order = 'ASC');