public static function EntityFieldHandlerHelper::click_sort in Entity API 7
Adds a click-sort to the query.
Parameters
$order: Either 'ASC' or 'DESC'.
9 calls to EntityFieldHandlerHelper::click_sort()
- entity_views_handler_field_boolean::click_sort in views/
handlers/ entity_views_handler_field_boolean.inc - Adds a click-sort to the query.
- entity_views_handler_field_date::click_sort in views/
handlers/ entity_views_handler_field_date.inc - Adds a click-sort to the query.
- entity_views_handler_field_duration::click_sort in views/
handlers/ entity_views_handler_field_duration.inc - Adds a click-sort to the query.
- entity_views_handler_field_entity::click_sort in views/
handlers/ entity_views_handler_field_entity.inc - Adds a click-sort to the query.
- entity_views_handler_field_field::click_sort in views/
handlers/ entity_views_handler_field_field.inc - Adds a click-sort to the query.
File
- views/
handlers/ entity_views_field_handler_helper.inc, line 124 - Contains the EntityFieldHandlerHelper class.
Class
- EntityFieldHandlerHelper
- Helper class containing static implementations of common field handler methods.
Code
public static function click_sort($handler, $order) {
// The normal orderby() method for this usually won't work here. So we need
// query plugins to provide their own method for this.
if (method_exists($handler->query, 'add_selector_orderby')) {
$selector = self::construct_property_selector($handler, TRUE);
$handler->query
->add_selector_orderby($selector, $order);
}
}