Differential D20411 Diff 48718 src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php
Show All 36 Lines | protected function buildQueryFromParameters(array $map) { | ||||
if ($map['paneltype']) { | if ($map['paneltype']) { | ||||
$query->withPanelTypes(array($map['paneltype'])); | $query->withPanelTypes(array($map['paneltype'])); | ||||
} | } | ||||
if ($map['authorPHIDs']) { | if ($map['authorPHIDs']) { | ||||
$query->withAuthorPHIDs($map['authorPHIDs']); | $query->withAuthorPHIDs($map['authorPHIDs']); | ||||
} | } | ||||
if ($map['name'] !== null) { | |||||
$query->withNameNgrams($map['name']); | |||||
} | |||||
return $query; | return $query; | ||||
} | } | ||||
protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
return array( | return array( | ||||
id(new PhabricatorSearchTextField()) | |||||
->setLabel(pht('Name Contains')) | |||||
->setKey('name') | |||||
->setDescription(pht('Search for panels by name substring.')), | |||||
id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
->setLabel(pht('Authored By')) | ->setLabel(pht('Authored By')) | ||||
->setKey('authorPHIDs') | ->setKey('authorPHIDs') | ||||
->setDatasource(new PhabricatorPeopleUserFunctionDatasource()), | ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()), | ||||
id(new PhabricatorSearchSelectField()) | id(new PhabricatorSearchSelectField()) | ||||
->setKey('status') | ->setKey('status') | ||||
->setLabel(pht('Status')) | ->setLabel(pht('Status')) | ||||
->setOptions( | ->setOptions( | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |