Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / releeph / controller / ReleephController.php
blobf48d2858e88455c599015ca049e855cd447201ec
1 <?php
3 abstract class ReleephController extends PhabricatorController {
5 public function buildSideNavView($for_app = false) {
6 $user = $this->getRequest()->getUser();
8 $nav = new AphrontSideNavFilterView();
9 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
11 if ($for_app) {
12 $nav->addFilter('project/create/', pht('Create Product'));
15 id(new ReleephProductSearchEngine())
16 ->setViewer($user)
17 ->addNavigationItems($nav->getMenu());
19 $nav->selectFilter(null);
21 return $nav;
24 public function buildApplicationMenu() {
25 return $this->buildSideNavView(true)->getMenu();
29 protected function getProductViewURI(ReleephProject $product) {
30 return $this->getApplicationURI('project/'.$product->getID().'/');
33 protected function getBranchViewURI(ReleephBranch $branch) {
34 return $this->getApplicationURI('branch/'.$branch->getID().'/');