forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhabricatorFeedListController.php
38 lines (28 loc) · 1.01 KB
/
PhabricatorFeedListController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
final class PhabricatorFeedListController extends PhabricatorFeedController
implements PhabricatorApplicationSearchResultsControllerInterface {
private $queryKey;
public function shouldAllowPublic() {
return true;
}
public function willProcessRequest(array $data) {
$this->queryKey = idx($data, 'queryKey');
}
public function processRequest() {
$request = $this->getRequest();
$controller = id(new PhabricatorApplicationSearchController($request))
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorFeedSearchEngine())
->setNavigation($this->buildSideNavView());
return $this->delegateToController($controller);
}
public function renderResultsList(
array $feed,
PhabricatorSavedQuery $query) {
$builder = new PhabricatorFeedBuilder($feed);
$builder->setShowHovercards(true);
$builder->setUser($this->getRequest()->getUser());
$view = $builder->buildView();
return phutil_tag_div('phabricator-feed-frame', $view);
}
}