Differential D13589 Diff 33531 src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
| Show All 23 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| } | } | ||||
| // Default this to the query string to make debugging a little bit easier. | // Default this to the query string to make debugging a little bit easier. | ||||
| $raw_query = nonempty($request->getStr('raw'), $query); | $raw_query = nonempty($request->getStr('raw'), $query); | ||||
| // This makes form submission easier in the debug view. | // This makes form submission easier in the debug view. | ||||
| $class = nonempty($request->getURIData('class'), $request->getStr('class')); | $class = nonempty($request->getURIData('class'), $request->getStr('class')); | ||||
| $sources = id(new PhutilSymbolLoader()) | $sources = id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass('PhabricatorTypeaheadDatasource') | ->setAncestorClass('PhabricatorTypeaheadDatasource') | ||||
| ->loadObjects(); | ->execute(); | ||||
| if (isset($sources[$class])) { | if (isset($sources[$class])) { | ||||
| $source = $sources[$class]; | $source = $sources[$class]; | ||||
| $source->setParameters($request->getRequestData()); | $source->setParameters($request->getRequestData()); | ||||
| $source->setViewer($viewer); | $source->setViewer($viewer); | ||||
| // NOTE: Wrapping the source in a Composite datasource ensures we perform | // NOTE: Wrapping the source in a Composite datasource ensures we perform | ||||
| // application visibility checks for the viewer, so we do not need to do | // application visibility checks for the viewer, so we do not need to do | ||||
| // those separately. | // those separately. | ||||
| ▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines | |||||