2013-01-19 22:46:48 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class PhabricatorApplicationsController extends PhabricatorController {
|
|
|
|
|
2013-10-02 22:13:07 +02:00
|
|
|
public function buildSideNavView($for_app = false) {
|
2013-01-19 22:46:48 +01:00
|
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
2013-10-02 22:13:07 +02:00
|
|
|
|
|
|
|
id(new PhabricatorAppSearchEngine())
|
|
|
|
->setViewer($user)
|
|
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
|
|
|
|
$nav->selectFilter(null);
|
2013-01-19 22:46:48 +01:00
|
|
|
|
|
|
|
return $nav;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function buildApplicationMenu() {
|
2013-10-02 22:13:07 +02:00
|
|
|
return $this->buildSideNavView(true)->getMenu();
|
2013-01-19 22:46:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|