Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phame / controller / post / PhamePostListController.php
blob71e73f1dc6b9dd73632cfb0ef35ab7f03c418d82
1 <?php
3 final class PhamePostListController extends PhamePostController {
5 public function shouldAllowPublic() {
6 return true;
9 public function handleRequest(AphrontRequest $request) {
10 $query_key = $request->getURIData('queryKey');
11 $controller = id(new PhabricatorApplicationSearchController())
12 ->setQueryKey($query_key)
13 ->setSearchEngine(new PhamePostSearchEngine())
14 ->setNavigation($this->buildSideNavView());
16 return $this->delegateToController($controller);
19 public function buildSideNavView() {
20 $viewer = $this->getRequest()->getUser();
22 $nav = new AphrontSideNavFilterView();
23 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
25 id(new PhamePostSearchEngine())
26 ->setViewer($viewer)
27 ->addNavigationItems($nav->getMenu());
29 $nav->addLabel(pht('Blogs'));
30 $nav->addFilter('blog/', pht('Manage Blogs'));
32 $nav->selectFilter(null);
34 return $nav;