public function sio__vocabulary::queryOrder
3.x sio__vocabulary.inc | public sio__vocabulary::queryOrder($query, $order) |
Overrides ChadoField::queryOrder
See also
File
- tripal_chado/
includes/ TripalFields/ sio__vocabulary/ sio__vocabulary.inc, line 111
Class
Code
public function queryOrder($query, $order) {
// If the table hasn't yet been joined then add it.
$joins = $query->getTables();
if (!in_array($this->field['field_name'], $joins)) {
$alias = $this->field['field_name'];
$this->queryJoinOnce($query, 'cv', $alias, "base.cv_id = $alias.cv_id");
$query->orderBy("$alias.name", $order['direction']);
}
}