3 final class PhabricatorProjectSearchField
4 extends PhabricatorSearchTokenizerField
{
6 protected function getDefaultValue() {
10 protected function newDatasource() {
11 return new PhabricatorProjectLogicalDatasource();
14 protected function getValueFromRequest(AphrontRequest
$request, $key) {
15 $list = $this->getListFromRequest($request, $key);
19 $project_type = PhabricatorProjectProjectPHIDType
::TYPECONST
;
20 foreach ($list as $item) {
21 $type = phid_get_type($item);
22 if ($type == $project_type) {
25 if (PhabricatorTypeaheadDatasource
::isFunctionToken($item)) {
26 // If this is a function, pass it through unchanged; we'll evaluate
36 $projects = id(new PhabricatorProjectQuery())
37 ->setViewer($this->getViewer())
40 foreach ($projects as $project) {
41 $phids[] = $project->getPHID();
43 $phids = array_unique($phids);
50 protected function newConduitParameterType() {
51 return new ConduitProjectListParameterType();