Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/query/NuanceSourceSearchEngine.php
| Show All 12 Lines | final class NuanceSourceSearchEngine | ||||
| public function newQuery() { | public function newQuery() { | ||||
| return new NuanceSourceQuery(); | return new NuanceSourceQuery(); | ||||
| } | } | ||||
| protected function buildQueryFromParameters(array $map) { | protected function buildQueryFromParameters(array $map) { | ||||
| $query = $this->newQuery(); | $query = $this->newQuery(); | ||||
| if ($map['match'] !== null) { | |||||
| $query->withNameNgrams($map['match']); | |||||
| } | |||||
| return $query; | return $query; | ||||
| } | } | ||||
| protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
| return array(); | return array( | ||||
| id(new PhabricatorSearchTextField()) | |||||
| ->setLabel(pht('Name Contains')) | |||||
| ->setKey('match') | |||||
| ->setDescription(pht('Search for sources by name substring.')), | |||||
| ); | |||||
| } | } | ||||
| protected function getURI($path) { | protected function getURI($path) { | ||||
| return '/nuance/source/'.$path; | return '/nuance/source/'.$path; | ||||
| } | } | ||||
| protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
| $names = array( | $names = array( | ||||
| ▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines | |||||