class community_tags_views_handler_sort_tag_count in Community Tags 6.2
Hierarchy
- class \community_tags_views_handler_sort_tag_count extends \views_handler_sort
Expanded class hierarchy of community_tags_views_handler_sort_tag_count
1 string reference to 'community_tags_views_handler_sort_tag_count'
- community_tags_views_data in community_tags_views/
community_tags_views.views.inc
File
- community_tags_views/
views/ handlers/ community_tags_views_handler_sort_tag_count.inc, line 3
View source
class community_tags_views_handler_sort_tag_count extends views_handler_sort {
function query() {
$this
->ensure_my_table();
// Add the field.
$aggregate_field = 'COUNT(' . $this->table_alias . '.tid)';
$this->query
->add_orderby(NULL, $aggregate_field, $this->options['order'], $this->field);
$this->query->distinct = TRUE;
}
}