Support ordering in SearchField
Summary: Ref T8441. Ref T7715. Automatically generate a modern "Order" control in ApplicationSearch for engines which fully support SearchField. Notably, this allows the standard "Order" control to automatically support custom field orders. We do this in Maniphest today, but in an ad-hoc way. Test Plan: Performed order-by queries in Almanac (Services), Pholio, Files, People, Projects, and Paste. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7715, T8441 Differential Revision: https://secure.phabricator.com/D13193
This commit is contained in:
		| @@ -95,12 +95,25 @@ final class PhabricatorProjectQuery | ||||
|     return $this; | ||||
|   } | ||||
|  | ||||
|   public function newResultObject() { | ||||
|     return new PhabricatorProject(); | ||||
|   } | ||||
|  | ||||
|   protected function getDefaultOrderVector() { | ||||
|     return array('name'); | ||||
|   } | ||||
|  | ||||
|   public function getOrderableColumns() { | ||||
|   public function getBuiltinOrders() { | ||||
|     return array( | ||||
|       'name' => array( | ||||
|         'vector' => array('name'), | ||||
|         'name' => pht('Name'), | ||||
|       ), | ||||
|     ) + parent::getBuiltinOrders(); | ||||
|   } | ||||
|  | ||||
|   public function getOrderableColumns() { | ||||
|     return parent::getOrderableColumns() + array( | ||||
|       'name' => array( | ||||
|         'table' => $this->getPrimaryTableAlias(), | ||||
|         'column' => 'name', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley