2011-02-21 03:41:23 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class PhabricatorProjectController extends PhabricatorController {
|
|
|
|
|
2013-07-22 17:34:35 +02:00
|
|
|
public function buildSideNavView($for_app = false) {
|
2013-02-13 18:22:14 +01:00
|
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
2013-07-22 17:34:35 +02:00
|
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
2013-02-13 18:22:14 +01:00
|
|
|
|
|
|
|
if ($for_app) {
|
2013-07-22 17:34:35 +02:00
|
|
|
$nav->addFilter('create', pht('Create Project'));
|
2013-02-13 18:22:14 +01:00
|
|
|
}
|
|
|
|
|
2013-07-22 17:34:35 +02:00
|
|
|
id(new PhabricatorProjectSearchEngine())
|
|
|
|
->setViewer($user)
|
|
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
|
2013-02-13 18:22:14 +01:00
|
|
|
return $nav;
|
|
|
|
}
|
|
|
|
|
2011-02-21 03:41:23 +01:00
|
|
|
}
|