mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-04 03:41:01 +01:00
06c94b8515
Summary: Ref T988. Ref T2625. Rough cut of ApplicationSearch in Diviner, for detailed Atom queries. This isn't useful yet, and isn't linked in the UI. Test Plan: {F44836} Reviewers: btrahan, chad Reviewed By: btrahan CC: aran Maniphest Tasks: T988, T2625 Differential Revision: https://secure.phabricator.com/D6094
49 lines
950 B
PHP
49 lines
950 B
PHP
<?php
|
|
|
|
final class DivinerAtomSearchEngine
|
|
extends PhabricatorApplicationSearchEngine {
|
|
|
|
public function buildSavedQueryFromRequest(AphrontRequest $request) {
|
|
$saved = new PhabricatorSavedQuery();
|
|
|
|
return $saved;
|
|
}
|
|
|
|
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
|
|
$query = id(new DivinerAtomQuery());
|
|
|
|
return $query;
|
|
}
|
|
|
|
public function buildSearchForm(
|
|
AphrontFormView $form,
|
|
PhabricatorSavedQuery $saved_query) {
|
|
|
|
}
|
|
|
|
protected function getURI($path) {
|
|
return '/diviner/'.$path;
|
|
}
|
|
|
|
public function getBuiltinQueryNames() {
|
|
$names = array(
|
|
'all' => pht('All'),
|
|
);
|
|
|
|
return $names;
|
|
}
|
|
|
|
public function buildSavedQueryFromBuiltin($query_key) {
|
|
|
|
$query = $this->newSavedQuery();
|
|
$query->setQueryKey($query_key);
|
|
|
|
switch ($query_key) {
|
|
case 'all':
|
|
return $query;
|
|
}
|
|
|
|
return parent::buildSavedQueryFromBuiltin($query_key);
|
|
}
|
|
|
|
}
|