Changeset View
Changeset View
Standalone View
Standalone View
src/applications/releeph/query/ReleephRequestSearchEngine.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { | ||||
return $query; | return $query; | ||||
} | } | ||||
public function buildSearchForm( | public function buildSearchForm( | ||||
AphrontFormView $form, | AphrontFormView $form, | ||||
PhabricatorSavedQuery $saved_query) { | PhabricatorSavedQuery $saved_query) { | ||||
$phids = $saved_query->getParameter('requestorPHIDs', array()); | $requestor_phids = $saved_query->getParameter('requestorPHIDs', array()); | ||||
$requestor_handles = id(new PhabricatorHandleQuery()) | |||||
->setViewer($this->requireViewer()) | |||||
->withPHIDs($phids) | |||||
->execute(); | |||||
$form | $form | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormSelectControl()) | id(new AphrontFormSelectControl()) | ||||
->setName('status') | ->setName('status') | ||||
->setLabel(pht('Status')) | ->setLabel(pht('Status')) | ||||
->setValue($saved_query->getParameter('status')) | ->setValue($saved_query->getParameter('status')) | ||||
->setOptions($this->getStatusOptions())) | ->setOptions($this->getStatusOptions())) | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormSelectControl()) | id(new AphrontFormSelectControl()) | ||||
->setName('severity') | ->setName('severity') | ||||
->setLabel(pht('Severity')) | ->setLabel(pht('Severity')) | ||||
->setValue($saved_query->getParameter('severity')) | ->setValue($saved_query->getParameter('severity')) | ||||
->setOptions($this->getSeverityOptions())) | ->setOptions($this->getSeverityOptions())) | ||||
->appendChild( | ->appendControl( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setDatasource(new PhabricatorPeopleDatasource()) | ->setDatasource(new PhabricatorPeopleDatasource()) | ||||
->setName('requestors') | ->setName('requestors') | ||||
->setLabel(pht('Requestors')) | ->setLabel(pht('Requestors')) | ||||
->setValue($requestor_handles)); | ->setValue($requestor_phids)); | ||||
} | } | ||||
protected function getURI($path) { | protected function getURI($path) { | ||||
return $this->baseURI.$path; | return $this->baseURI.$path; | ||||
} | } | ||||
protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
$names = array( | $names = array( | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |