[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/search/engine/ -> PhabricatorApplicationSearchEngine.php (summary)

Represents an abstract search engine for an application. It supports creating and storing saved queries.

File Size: 882 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 48 functions

  setViewer()
  requireViewer()
  setContext()
  isPanelContext()
  saveQuery()
  getErrors()
  addError()
  getQueryResultsPageURI()
  getQueryManagementURI()
  newSavedQuery()
  addNavigationItems()
  loadAllNamedQueries()
  loadEnabledNamedQueries()
  getApplicationURI()
  getApplication()
  getApplicationClassName()
  getAllEngines()
  getEngineByClassName()
  getBuiltinQueries()
  getBuiltinQuery()
  getBuiltinQueryNames()
  isBuiltinQuery()
  buildSavedQueryFromBuiltin()
  readUsersFromRequest()
  readPHIDsFromRequest()
  readListFromRequest()
  readDateFromRequest()
  readBoolFromRequest()
  getBoolFromQuery()
  parseDateTime()
  buildDateRange()
  getPageSize()
  shouldUseOffsetPaging()
  newPagerForSavedQuery()
  executeQuery()
  setRequest()
  getRequest()
  renderResults()
  getRequiredHandlePHIDsForResultList()
  renderResultList()
  getCustomFieldObject()
  getCustomFieldList()
  readCustomFieldsFromRequest()
  applyCustomFieldsToQuery()
  applyOrderByToQuery()
  getCustomFieldOrderOptions()
  getKeyForCustomField()
  appendCustomFieldsToForm()

Functions
Functions that are not part of a class:

setViewer(PhabricatorUser $viewer)   X-Ref
No description

requireViewer()   X-Ref
No description

setContext($context)   X-Ref
No description

isPanelContext()   X-Ref
No description

saveQuery(PhabricatorSavedQuery $query)   X-Ref
No description

getErrors()   X-Ref
No description

addError($error)   X-Ref
No description

getQueryResultsPageURI($query_key)   X-Ref
Return an application URI corresponding to the results page of a query.
Normally, this is something like `/application/query/QUERYKEY/`.

param: string  The query key to build a URI for.
return: string  URI where the query can be executed.

getQueryManagementURI()   X-Ref
Return an application URI for query management. This is used when, e.g.,
a query deletion operation is cancelled.

return: string  URI where queries can be managed.

newSavedQuery()   X-Ref
No description

addNavigationItems(PHUIListView $menu)   X-Ref
No description

loadAllNamedQueries()   X-Ref
No description

loadEnabledNamedQueries()   X-Ref
No description

getApplicationURI($path = '')   X-Ref
No description

getApplication()   X-Ref
No description

getApplicationClassName()   X-Ref
No description

getAllEngines()   X-Ref
Load all available application search engines.

return: list<PhabricatorApplicationSearchEngine> All available engines.

getEngineByClassName($class_name)   X-Ref
Get an engine by class name, if it exists.

return: PhabricatorApplicationSearchEngine|null Engine, or null if it does

getBuiltinQueries()   X-Ref


getBuiltinQuery($query_key)   X-Ref


getBuiltinQueryNames()   X-Ref


isBuiltinQuery($query_key)   X-Ref


buildSavedQueryFromBuiltin($query_key)   X-Ref


readUsersFromRequest(AphrontRequest $request,$key,array $allow_types = array()   X-Ref
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.

param: AphrontRequest  Request to read user PHIDs from.
param: string          Key to read in the request.
param: list<const>     Other permitted PHID types.
return: list<phid>     List of user PHIDs.

readPHIDsFromRequest(AphrontRequest $request,$key,array $allow_types = array()   X-Ref
Read a list of generic PHIDs from a request in a flexible way. Like
@{method:readUsersFromRequest}, this method supports either array or
comma-delimited forms. Objects can be specified either by PHID or by
object name.

param: AphrontRequest  Request to read PHIDs from.
param: string          Key to read in the request.
param: list<const>     Optional, list of permitted PHID types.
return: list<phid>     List of object PHIDs.

readListFromRequest(AphrontRequest $request,$key)   X-Ref
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.

param: AphrontRequest  Request to read strings from.
param: string          Key to read in the request.
return: list<string>   List of values.

readDateFromRequest(AphrontRequest $request,$key)   X-Ref
No description

readBoolFromRequest(AphrontRequest $request,$key)   X-Ref
No description

getBoolFromQuery(PhabricatorSavedQuery $query, $key)   X-Ref
No description

parseDateTime($date_time)   X-Ref


buildDateRange(AphrontFormView $form,PhabricatorSavedQuery $saved_query,$start_key,$start_name,$end_key,$end_name)   X-Ref


getPageSize(PhabricatorSavedQuery $saved)   X-Ref
No description

shouldUseOffsetPaging()   X-Ref
No description

newPagerForSavedQuery(PhabricatorSavedQuery $saved)   X-Ref
No description

executeQuery(PhabricatorPolicyAwareQuery $query,AphrontView $pager)   X-Ref
No description

setRequest(AphrontRequest $request)   X-Ref
No description

getRequest()   X-Ref
No description

renderResults(array $objects,PhabricatorSavedQuery $query)   X-Ref
No description

getRequiredHandlePHIDsForResultList(array $objects,PhabricatorSavedQuery $query)   X-Ref
No description

renderResultList(array $objects,PhabricatorSavedQuery $query,array $handles)   X-Ref
No description

getCustomFieldObject()   X-Ref
Retrieve an object to use to define custom fields for this search.

To integrate with custom fields, subclasses should override this method
and return an instance of the application object which implements
@{interface:PhabricatorCustomFieldInterface}.

return: PhabricatorCustomFieldInterface|null Object with custom fields.

getCustomFieldList()   X-Ref
Get the custom fields for this search.

return: PhabricatorCustomFieldList|null Custom fields, if this search

readCustomFieldsFromRequest(AphrontRequest $request,PhabricatorSavedQuery $saved)   X-Ref
Moves data from the request into a saved query.

param: AphrontRequest Request to read.
param: PhabricatorSavedQuery Query to write to.
return: void

applyCustomFieldsToQuery(PhabricatorCursorPagedPolicyAwareQuery $query,PhabricatorSavedQuery $saved)   X-Ref
Applies data from a saved query to an executable query.

param: PhabricatorCursorPagedPolicyAwareQuery Query to constrain.
param: PhabricatorSavedQuery Saved query to read.
return: void

applyOrderByToQuery(PhabricatorCursorPagedPolicyAwareQuery $query,array $standard_values,$order)   X-Ref
No description

getCustomFieldOrderOptions()   X-Ref
No description

getKeyForCustomField(PhabricatorCustomField $field)   X-Ref
Get a unique key identifying a field.

param: PhabricatorCustomField Field to identify.
return: string Unique identifier, suitable for use as an input name.

appendCustomFieldsToForm(AphrontFormView $form,PhabricatorSavedQuery $saved)   X-Ref
Add inputs to an application search form so the user can query on custom
fields.

param: AphrontFormView Form to update.
param: PhabricatorSavedQuery Values to prefill.
return: void



Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1