Differential D12482 Diff 29969 src/applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php
Show All 18 Lines | public function getComponentDatasources() { | ||||
return array( | return array( | ||||
new PhabricatorPeopleDatasource(), | new PhabricatorPeopleDatasource(), | ||||
); | ); | ||||
} | } | ||||
public function getDatasourceFunctions() { | public function getDatasourceFunctions() { | ||||
return array( | return array( | ||||
'projects' => array( | 'projects' => array( | ||||
'name' => pht("Find results in any of a user's projects."), | 'name' => pht('Projects: ...'), | ||||
'arguments' => pht('username'), | |||||
'summary' => pht("Find results in any of a user's projects."), | |||||
'description' => pht( | |||||
'This function allows you to find results associated with any '. | |||||
'of the projects a specified user is a member of. For example, '. | |||||
'this will find results associated with all of the projects '. | |||||
'`alincoln` is a member of:'. | |||||
"\n\n". | |||||
'> projects(alincoln)'. | |||||
"\n\n"), | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
protected function didLoadResults(array $results) { | protected function didLoadResults(array $results) { | ||||
foreach ($results as $result) { | foreach ($results as $result) { | ||||
$result | $result | ||||
->setTokenType(PhabricatorTypeaheadTokenView::TYPE_FUNCTION) | ->setTokenType(PhabricatorTypeaheadTokenView::TYPE_FUNCTION) | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |