chado_views_handler_sort.inc 487 B

12345678910111213141516171819202122
  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. }