Changeset View
Changeset View
Standalone View
Standalone View
src/applications/badges/query/PhabricatorBadgesQuery.php
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
return $where; | return $where; | ||||
} | } | ||||
public function getQueryApplicationClass() { | public function getQueryApplicationClass() { | ||||
return 'PhabricatorBadgesApplication'; | return 'PhabricatorBadgesApplication'; | ||||
} | } | ||||
public function getBuiltinOrders() { | |||||
return array( | |||||
'quality' => array( | |||||
'vector' => array('quality', 'id'), | |||||
'name' => pht('Rarity (Rarest First)'), | |||||
), | |||||
'shoddiness' => array( | |||||
epriestley: Maybe `'shoddiness'`? :3
| |||||
'vector' => array('-quality', '-id'), | |||||
'name' => pht('Rarity (Most Common First)'), | |||||
), | |||||
) + parent::getBuiltinOrders(); | |||||
} | |||||
public function getOrderableColumns() { | |||||
return array( | |||||
'quality' => array( | |||||
'table' => $this->getPrimaryTableAlias(), | |||||
'column' => 'quality', | |||||
'reverse' => true, | |||||
'type' => 'int', | |||||
Done Inline ActionsThis one should just be int. epriestley: This one should just be `int`. | |||||
), | |||||
Done Inline Actions(You can omit this if you want, false is the default.) epriestley: (You can omit this if you want, `false` is the default.) | |||||
) + parent::getOrderableColumns(); | |||||
} | |||||
protected function getPagingValueMap($cursor, array $keys) { | |||||
$badge = $this->loadCursorObject($cursor); | |||||
return array( | |||||
'quality' => $badge->getQuality(), | |||||
'id' => $badge->getID(), | |||||
); | |||||
} | |||||
} | } |
Maybe 'shoddiness'? :3