Differential D12528 Diff 30088 src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php
Show First 20 Lines • Show All 417 Lines • ▼ Show 20 Lines | /* -( Token Functions )---------------------------------------------------- */ | ||||
/** | /** | ||||
* @task functions | * @task functions | ||||
*/ | */ | ||||
protected function getCurrentFunction() { | protected function getCurrentFunction() { | ||||
return nonempty(last($this->functionStack), null); | return nonempty(last($this->functionStack), null); | ||||
} | } | ||||
protected function renderTokensFromResults(array $results, array $values) { | |||||
$results = array_select_keys($results, $values); | |||||
$tokens = array(); | |||||
foreach ($results as $result) { | |||||
$tokens[] = PhabricatorTypeaheadTokenView::newFromTypeaheadResult( | |||||
$result); | |||||
} | |||||
return $tokens; | |||||
} | |||||
} | } |