chado_views_handler_sort.inc

  1. 3.x tripal_chado/views_handlers/chado_views_handler_sort.inc
  2. 1.x tripal_views/views/handlers/chado_views_handler_sort.inc

File

tripal_chado/views_handlers/chado_views_handler_sort.inc
View source
  1. <?php
  2. /**
  3. * Views handlers providing sort support for chado fields.
  4. */
  5. /**
  6. * Adds support for generic sorting.
  7. */
  8. class chado_views_handler_sort extends views_handler_sort {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. function query() {
  13. // Adds joins to chado_entity and the chado table this field is from.
  14. $alias = _chado_views_add_table_joins($this);
  15. // Add the sort.
  16. $this->query->add_orderby($alias, $this->definition['chado_field'], $this->options['order']);
  17. }
  18. }