Differential D19848 Diff 47405 src/applications/repository/query/PhabricatorRepositorySearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/query/PhabricatorRepositorySearchEngine.php
Show All 38 Lines | return array( | ||||
->setLabel(pht('Types')) | ->setLabel(pht('Types')) | ||||
->setKey('types') | ->setKey('types') | ||||
->setOptions(PhabricatorRepositoryType::getAllRepositoryTypes()), | ->setOptions(PhabricatorRepositoryType::getAllRepositoryTypes()), | ||||
id(new PhabricatorSearchStringListField()) | id(new PhabricatorSearchStringListField()) | ||||
->setLabel(pht('URIs')) | ->setLabel(pht('URIs')) | ||||
->setKey('uris') | ->setKey('uris') | ||||
->setDescription( | ->setDescription( | ||||
pht('Search for repositories by clone/checkout URI.')), | pht('Search for repositories by clone/checkout URI.')), | ||||
id(new PhabricatorPHIDsSearchField()) | |||||
->setLabel(pht('Services')) | |||||
->setKey('almanacServicePHIDs') | |||||
->setAliases( | |||||
array( | |||||
'almanacServicePHID', | |||||
'almanacService', | |||||
'almanacServices', | |||||
)), | |||||
); | ); | ||||
} | } | ||||
protected function buildQueryFromParameters(array $map) { | protected function buildQueryFromParameters(array $map) { | ||||
$query = $this->newQuery(); | $query = $this->newQuery(); | ||||
if ($map['callsigns']) { | if ($map['callsigns']) { | ||||
$query->withCallsigns($map['callsigns']); | $query->withCallsigns($map['callsigns']); | ||||
Show All 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
if ($map['types']) { | if ($map['types']) { | ||||
$query->withTypes($map['types']); | $query->withTypes($map['types']); | ||||
} | } | ||||
if ($map['uris']) { | if ($map['uris']) { | ||||
$query->withURIs($map['uris']); | $query->withURIs($map['uris']); | ||||
} | } | ||||
if ($map['almanacServicePHIDs']) { | |||||
$query->withAlmanacServicePHIDs($map['almanacServicePHIDs']); | |||||
} | |||||
return $query; | return $query; | ||||
} | } | ||||
protected function getURI($path) { | protected function getURI($path) { | ||||
return '/diffusion/'.$path; | return '/diffusion/'.$path; | ||||
} | } | ||||
protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |