public function setController($controller)
PhabricatorController | $controller |
wild |
public function getController()
wild |
public function buildResponse()
wild |
public function newResultObject()
wild |
public function newQuery()
wild |
public function setViewer($viewer)
PhabricatorUser | $viewer |
wild |
protected function requireViewer()
wild |
public function setContext($context)
$context |
wild |
public function isPanelContext()
wild |
public function setNavigationItems($navigation_items)
array | $navigation_items |
wild |
public function getNavigationItems()
wild |
public function canUseInPanelContext()
wild |
public function saveQuery($query)
PhabricatorSavedQuery | $query |
wild |
public function buildSavedQueryFromRequest($request)
Create a saved query object from the request.
AphrontRequest | $request | The search request. |
PhabricatorSavedQuery |
public function buildQueryFromSavedQuery($original)
Executes the saved query.
PhabricatorSavedQuery | $original | The saved query to operate on. |
PhabricatorQuery | The result of the query. |
protected function willUseSavedQuery($saved)
Hook for subclasses to adjust saved queries prior to use.
If an application changes how queries are saved, it can implement this hook to keep old queries working the way users expect, by reading, adjusting, and overwriting parameters.
PhabricatorSavedQuery | $saved | Saved query which will be executed. |
void |
protected function buildQueryFromParameters($parameters)
array | $parameters |
wild |
public function buildSearchForm($form, $saved)
Builds the search form using the request.
AphrontFormView | $form | Form to populate. |
PhabricatorSavedQuery | $saved | The query from which to build the form. |
void |
protected function buildSearchFields()
wild |
protected function shouldShowOrderField()
wild |
private function adjustFieldsForDisplay($field_map)
array | $field_map |
wild |
protected function buildCustomSearchFields()
wild |
protected function getDefaultFieldOrder()
Define the default display order for fields by returning a list of field keys.
You can use the special key ... to mean "all unspecified fields go here". This lets you easily put important fields at the top of the form, standard fields in the middle of the form, and less important fields at the bottom.
For example, you might return a list like this:
return array( 'authorPHIDs', 'reviewerPHIDs', '...', 'createdAfter', 'createdBefore', );
Any unspecified fields (including custom fields and fields added automatically by infrastructure) will be put in the middle.
list<string> | Default ordering for field keys. |
protected function getHiddenFields()
Return a list of field keys which should be hidden from the viewer.
list<string> | Fields to hide. |
public function getErrors()
wild |
public function addError($error)
$error |
wild |
public function getQueryResultsPageURI($query_key)
Return an application URI corresponding to the results page of a query. Normally, this is something like /application/query/QUERYKEY/.
string | $query_key | The query key to build a URI for. |
string | URI where the query can be executed. |
public function getQueryManagementURI()
Return an application URI for query management. This is used when, e.g., a query deletion operation is cancelled.
string | URI where queries can be managed. |
public function getQueryBaseURI()
wild |
public function getExportURI($query_key)
$query_key |
wild |
public function getCustomizeURI($query_key, $object_phid, $context_phid)
$query_key | ||
$object_phid | ||
$context_phid |
wild |
abstract protected function getURI($path)
Return the URI to a path within the application. Used to construct default URIs for management and results.
$path |
string | URI to path. |
abstract public function getResultTypeDescription()
Return a human readable description of the type of objects this query searches for.
For example, "Tasks" or "Commits".
string | Human-readable description of what this engine is used to find. |
public function newSavedQuery()
wild |
public function addNavigationItems($menu)
PHUIListView | $menu |
wild |
public function loadAllNamedQueries()
wild |
public function loadEnabledNamedQueries()
wild |
public function getDefaultQueryKey()
wild |
protected function setQueryProjects($query, $saved)
PhabricatorCursorPagedPolicyAwareQuery | $query | |
PhabricatorSavedQuery | $saved |
wild |
protected function getApplicationURI($path)
$path |
wild |
protected function getApplication()
wild |
abstract public function getApplicationClassName()
wild |
public static function getAllEngines()
Load all available application search engines.
list<PhabricatorApplicationSearchEngine> | All available engines. |
public static function getEngineByClassName($class_name)
Get an engine by class name, if it exists.
$class_name |
PhabricatorApplicationSearchEngine|null | Engine, or null if it does not exist. |
public function getBuiltinQueries()
wild |
public function getBuiltinQuery($query_key)
$query_key |
wild |
protected function getBuiltinQueryNames()
wild |
public function isBuiltinQuery($query_key)
$query_key |
wild |
public function buildSavedQueryFromBuiltin($query_key)
$query_key |
wild |
protected function readUsersFromRequest($request, $key, $allow_types)
Read a list of user PHIDs from a request in a flexible way. This method supports either of these forms:
users[]=alincoln&users[]=htaft users=alincoln,htaft
Additionally, users can be specified either by PHID or by name.
The main goal of this flexibility is to allow external programs to generate links to pages (like "alincoln's open revisions") without needing to make API calls.
AphrontRequest | $request | Request to read user PHIDs from. |
string | $key | Key to read in the request. |
list<const> | $allow_types | Other permitted PHID types. |
list<phid> | List of user PHIDs and selector functions. |
protected function readSubscribersFromRequest($request, $key)
Read a list of subscribers from a request in a flexible way.
AphrontRequest | $request | Request to read PHIDs from. |
string | $key | Key to read in the request. |
list<phid> | List of object PHIDs. |
protected function readPHIDsFromRequest($request, $key, $allow_types)
Read a list of generic PHIDs from a request in a flexible way. Like readUsersFromRequest(), this method supports either array or comma-delimited forms. Objects can be specified either by PHID or by object name.
AphrontRequest | $request | Request to read PHIDs from. |
string | $key | Key to read in the request. |
list<const> | $allow_types | Optional, list of permitted PHID types. |
list<phid> | List of object PHIDs. |
protected function readListFromRequest($request, $key)
Read a list of items from the request, in either array format or string format:
list[]=item1&list[]=item2 list=item1,item2
This provides flexibility when constructing URIs, especially from external sources.
AphrontRequest | $request | Request to read strings from. |
string | $key | Key to read in the request. |
list<string> | List of values. |
protected function readBoolFromRequest($request, $key)
AphrontRequest | $request | |
$key |
wild |
protected function getBoolFromQuery($query, $key)
PhabricatorSavedQuery | $query | |
$key |
wild |
protected function parseDateTime($date_time)
$date_time |
wild |
protected function buildDateRange($form, $saved_query, $start_key, $start_name, $end_key, $end_name)
AphrontFormView | $form | |
PhabricatorSavedQuery | $saved_query | |
$start_key | ||
$start_name | ||
$end_key | ||
$end_name |
wild |
protected function newResultBuckets()
wild |
public function getResultBucket($saved)
PhabricatorSavedQuery | $saved |
wild |
public function getPageSize($saved)
PhabricatorSavedQuery | $saved |
wild |
public function shouldUseOffsetPaging()
wild |
public function newPagerForSavedQuery($saved)
PhabricatorSavedQuery | $saved |
wild |
public function executeQuery($query, $pager)
PhabricatorPolicyAwareQuery | $query | |
AphrontView | $pager |
wild |
protected function didExecuteQuery($query)
PhabricatorPolicyAwareQuery | $query |
wild |
public function setRequest($request)
AphrontRequest | $request |
wild |
public function getRequest()
wild |
public function renderResults($objects, $query)
array | $objects | |
PhabricatorSavedQuery | $query |
wild |
protected function getRequiredHandlePHIDsForResultList($objects, $query)
array | $objects | |
PhabricatorSavedQuery | $query |
wild |
abstract protected function renderResultList($objects, $query, $handles)
array | $objects | |
PhabricatorSavedQuery | $query | |
array | $handles |
wild |
public function getSearchFieldsForConduit()
wild |
public function buildConduitResponse($request, $method)
ConduitAPIRequest | $request | |
ConduitAPIMethod | $method |
wild |
public function getAllConduitFieldSpecifications()
wild |
private function getEngineExtensions()
wild |
private function getConduitFieldExtensions()
wild |
private function setQueryOrderForConduit($query, $request)
$query | ||
ConduitAPIRequest | $request |
wild |
private function setPagerLimitForConduit($pager, $request)
$pager | ||
ConduitAPIRequest | $request |
wild |
private function setPagerOffsetsForConduit($pager, $request)
$pager | ||
ConduitAPIRequest | $request |
wild |
protected function getObjectWireFieldsForConduit($object, $field_extensions, $extension_data)
$object | ||
array | $field_extensions | |
array | $extension_data |
wild |
public function getConduitSearchAttachments()
wild |
final public function renderNewUserView()
wild |
protected function getNewUserHeader()
wild |
protected function getNewUserBody()
wild |
public function newUseResultsActions($saved)
PhabricatorSavedQuery | $saved |
wild |
public function canExport()
wild |
final public function newExportFieldList()
wild |
final public function newExport($objects)
array | $objects |
wild |
protected function newExportFields()
wild |
protected function newExportData($objects)
array | $objects |
wild |
private function newExportExtensions()
wild |