mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
Provide PhabricatorSavedQuery to renderResultsList()
Summary: This allows the SavedQuery to modify what the result list looks like (e.g., include display flags and similar). Test Plan: Looked at some ApplicationSearch apps. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2625 Differential Revision: https://secure.phabricator.com/D6346
This commit is contained in:
parent
3ec4984f27
commit
23e18b1ca5
8 changed files with 25 additions and 8 deletions
|
@ -22,7 +22,9 @@ final class PhabricatorConduitListController
|
|||
return $this->delegateToController($controller);
|
||||
}
|
||||
|
||||
public function renderResultsList(array $methods) {
|
||||
public function renderResultsList(
|
||||
array $methods,
|
||||
PhabricatorSavedQuery $query) {
|
||||
assert_instances_of($methods, 'ConduitAPIMethod');
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
|
|
|
@ -23,7 +23,9 @@ final class DivinerAtomListController extends DivinerController
|
|||
return $this->delegateToController($controller);
|
||||
}
|
||||
|
||||
public function renderResultsList(array $symbols) {
|
||||
public function renderResultsList(
|
||||
array $symbols,
|
||||
PhabricatorSavedQuery $query) {
|
||||
return $this->renderAtomList($symbols);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,10 @@ final class PhabricatorFileListController extends PhabricatorFileController
|
|||
return $this->delegateToController($controller);
|
||||
}
|
||||
|
||||
public function renderResultsList(array $files) {
|
||||
public function renderResultsList(
|
||||
array $files,
|
||||
PhabricatorSavedQuery $query) {
|
||||
|
||||
assert_instances_of($files, 'PhabricatorFile');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
|
|
@ -23,7 +23,10 @@ final class PhabricatorMacroListController extends PhabricatorMacroController
|
|||
return $this->delegateToController($controller);
|
||||
}
|
||||
|
||||
public function renderResultsList(array $macros) {
|
||||
public function renderResultsList(
|
||||
array $macros,
|
||||
PhabricatorSavedQuery $query) {
|
||||
|
||||
assert_instances_of($macros, 'PhabricatorFileImageMacro');
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@ final class PhabricatorPasteListController extends PhabricatorPasteController
|
|||
return $this->delegateToController($controller);
|
||||
}
|
||||
|
||||
public function renderResultsList(array $pastes) {
|
||||
public function renderResultsList(
|
||||
array $pastes,
|
||||
PhabricatorSavedQuery $query) {
|
||||
assert_instances_of($pastes, 'PhabricatorPaste');
|
||||
|
||||
$user = $this->getRequest()->getUser();
|
||||
|
|
|
@ -27,7 +27,10 @@ final class PhabricatorPeopleListController extends PhabricatorPeopleController
|
|||
return $this->delegateToController($controller);
|
||||
}
|
||||
|
||||
public function renderResultsList(array $users) {
|
||||
public function renderResultsList(
|
||||
array $users,
|
||||
PhabricatorSavedQuery $query) {
|
||||
|
||||
assert_instances_of($users, 'PhabricatorUser');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
|
|
@ -177,7 +177,7 @@ final class PhabricatorApplicationSearchController
|
|||
$objects = $query->setViewer($request->getUser())
|
||||
->executeWithCursorPager($pager);
|
||||
|
||||
$list = $parent->renderResultsList($objects);
|
||||
$list = $parent->renderResultsList($objects, $saved_query);
|
||||
|
||||
$nav->appendChild($list);
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
interface PhabricatorApplicationSearchResultsControllerInterface {
|
||||
|
||||
public function renderResultsList(array $items);
|
||||
public function renderResultsList(
|
||||
array $items,
|
||||
PhabricatorSavedQuery $query);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue