Differential D12525 Diff 30083 src/applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php
Show All 36 Lines | return array( | ||||
"\n\n"), | "\n\n"), | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
protected function didLoadResults(array $results) { | protected function didLoadResults(array $results) { | ||||
foreach ($results as $result) { | foreach ($results as $result) { | ||||
$result | $result | ||||
->setColor(null) | |||||
->setTokenType(PhabricatorTypeaheadTokenView::TYPE_FUNCTION) | ->setTokenType(PhabricatorTypeaheadTokenView::TYPE_FUNCTION) | ||||
->setIcon('fa-asterisk') | ->setIcon('fa-asterisk') | ||||
->setPHID('projects('.$result->getPHID().')') | ->setPHID('projects('.$result->getPHID().')') | ||||
->setDisplayName(pht("User's Projects: %s", $result->getDisplayName())) | ->setDisplayName(pht("User's Projects: %s", $result->getDisplayName())) | ||||
->setName($result->getName().' projects'); | ->setName($result->getName().' projects'); | ||||
} | } | ||||
return $results; | return $results; | ||||
Show All 27 Lines | public function renderFunctionTokens($function, array $argv_list) { | ||||
foreach ($argv_list as $argv) { | foreach ($argv_list as $argv) { | ||||
$phids[] = head($argv); | $phids[] = head($argv); | ||||
} | } | ||||
$phids = $this->resolvePHIDs($phids); | $phids = $this->resolvePHIDs($phids); | ||||
$tokens = $this->renderTokens($phids); | $tokens = $this->renderTokens($phids); | ||||
foreach ($tokens as $token) { | foreach ($tokens as $token) { | ||||
$token->setColor(null); | |||||
if ($token->isInvalid()) { | if ($token->isInvalid()) { | ||||
$token | $token | ||||
->setValue(pht("User's Projects: Invalid User")); | ->setValue(pht("User's Projects: Invalid User")); | ||||
} else { | } else { | ||||
$token | $token | ||||
->setIcon('fa-asterisk') | ->setIcon('fa-asterisk') | ||||
->setTokenType(PhabricatorTypeaheadTokenView::TYPE_FUNCTION) | ->setTokenType(PhabricatorTypeaheadTokenView::TYPE_FUNCTION) | ||||
->setKey('projects('.$token->getKey().')') | ->setKey('projects('.$token->getKey().')') | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |