public function local__source_data::queryOrder
3.x local__source_data.inc | public local__source_data::queryOrder($query, $order) |
Overrides ChadoField::queryOrder
See also
File
- tripal_chado/
includes/ TripalFields/ local__source_data/ local__source_data.inc, line 129
Class
Code
public function queryOrder($query, $order) {
$field_term_id = $this->getFieldTermID();
$sourcename_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourcename');
$sourceversion_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourceversion');
$sourceuri_term = $field_term_id . ',' . chado_get_semweb_term('analysis', 'sourceuri');
if ($order['column'] == $sourcename_term) {
$query->orderBy("base.sourcename", $order['direction']);
}
if ($order['column'] == $sourceversion_term) {
$query->orderBy("base.sourceversion", $order['direction']);
}
}