Differential D13589 Diff 33531 src/applications/typeahead/controller/PhabricatorTypeaheadFunctionHelpController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/typeahead/controller/PhabricatorTypeaheadFunctionHelpController.php
| <?php | <?php | ||||
| final class PhabricatorTypeaheadFunctionHelpController | final class PhabricatorTypeaheadFunctionHelpController | ||||
| extends PhabricatorTypeaheadDatasourceController { | extends PhabricatorTypeaheadDatasourceController { | ||||
| public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function handleRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $class = $request->getURIData('class'); | $class = $request->getURIData('class'); | ||||
| $sources = id(new PhutilSymbolLoader()) | $sources = id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass('PhabricatorTypeaheadDatasource') | ->setAncestorClass('PhabricatorTypeaheadDatasource') | ||||
| ->loadObjects(); | ->execute(); | ||||
| if (!isset($sources[$class])) { | if (!isset($sources[$class])) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| $source = $sources[$class]; | $source = $sources[$class]; | ||||
| $application_class = $source->getDatasourceApplicationClass(); | $application_class = $source->getDatasourceApplicationClass(); | ||||
| if ($application_class) { | if ($application_class) { | ||||
| ▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines | |||||