Changeset View
Changeset View
Standalone View
Standalone View
src/applications/fund/query/FundBackerSearchEngine.php
Show First 20 Lines • Show All 50 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) { | PhabricatorSavedQuery $saved) { | ||||
$backer_phids = $saved->getParameter('backerPHIDs', array()); | $backer_phids = $saved->getParameter('backerPHIDs', array()); | ||||
$all_phids = array_mergev( | |||||
array( | |||||
$backer_phids, | |||||
)); | |||||
$handles = id(new PhabricatorHandleQuery()) | |||||
->setViewer($this->requireViewer()) | |||||
->withPHIDs($all_phids) | |||||
->execute(); | |||||
$form | $form | ||||
->appendChild( | ->appendControl( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setLabel(pht('Backers')) | ->setLabel(pht('Backers')) | ||||
->setName('backers') | ->setName('backers') | ||||
->setDatasource(new PhabricatorPeopleDatasource()) | ->setDatasource(new PhabricatorPeopleDatasource()) | ||||
->setValue(array_select_keys($handles, $backer_phids))); | ->setValue($backer_phids)); | ||||
} | } | ||||
protected function getURI($path) { | protected function getURI($path) { | ||||
if ($this->getInitiative()) { | if ($this->getInitiative()) { | ||||
return '/fund/backers/'.$this->getInitiative()->getID().'/'.$path; | return '/fund/backers/'.$this->getInitiative()->getID().'/'.$path; | ||||
} else { | } else { | ||||
return '/fund/backers/'.$path; | return '/fund/backers/'.$path; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |