Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | final class ManiphestTaskSearchEngine | ||||
} | } | ||||
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { | public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { | ||||
$query = id(new ManiphestTaskQuery()) | $query = id(new ManiphestTaskQuery()) | ||||
->needProjectPHIDs(true); | ->needProjectPHIDs(true); | ||||
$viewer = $this->requireViewer(); | $viewer = $this->requireViewer(); | ||||
$datasource = id(new PhabricatorTypeaheadUserParameterizedDatasource()) | $datasource = id(new PhabricatorPeopleUserFunctionDatasource()) | ||||
->setViewer($viewer); | ->setViewer($viewer); | ||||
$author_phids = $saved->getParameter('authorPHIDs', array()); | $author_phids = $saved->getParameter('authorPHIDs', array()); | ||||
$author_phids = $datasource->evaluateTokens($author_phids); | $author_phids = $datasource->evaluateTokens($author_phids); | ||||
if ($author_phids) { | if ($author_phids) { | ||||
$query->withAuthors($author_phids); | $query->withAuthors($author_phids); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | $form | ||||
->appendControl( | ->appendControl( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setDatasource(new PhabricatorProjectLogicalDatasource()) | ->setDatasource(new PhabricatorProjectLogicalDatasource()) | ||||
->setName('projects') | ->setName('projects') | ||||
->setLabel(pht('Projects')) | ->setLabel(pht('Projects')) | ||||
->setValue($projects)) | ->setValue($projects)) | ||||
->appendControl( | ->appendControl( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setDatasource(new PhabricatorTypeaheadUserParameterizedDatasource()) | ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) | ||||
->setName('authors') | ->setName('authors') | ||||
->setLabel(pht('Authors')) | ->setLabel(pht('Authors')) | ||||
->setValue($author_phids)) | ->setValue($author_phids)) | ||||
->appendControl( | ->appendControl( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setDatasource(new PhabricatorMetaMTAMailableFunctionDatasource()) | ->setDatasource(new PhabricatorMetaMTAMailableFunctionDatasource()) | ||||
->setName('subscribers') | ->setName('subscribers') | ||||
->setLabel(pht('Subscribers')) | ->setLabel(pht('Subscribers')) | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |