1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 19:32:40 +01:00
phorge-phorge/src/applications/files/controller/PhabricatorFileController.php

30 lines
681 B
PHP
Raw Normal View History

2011-01-23 03:33:00 +01:00
<?php
abstract class PhabricatorFileController extends PhabricatorController {
protected function buildSideNavView() {
$menu = $this->buildMenu($for_devices = false);
return AphrontSideNavFilterView::newFromMenu($menu);
}
2011-01-23 03:33:00 +01:00
protected function buildApplicationMenu() {
return $this->buildMenu($for_devices = true);
2011-01-23 03:33:00 +01:00
}
private function buildMenu($for_devices) {
$menu = new PHUIListView();
if ($for_devices) {
$menu->newLink(pht('Upload File'), $this->getApplicationURI('/upload/'));
}
id(new PhabricatorFileSearchEngine())
->setViewer($this->getRequest()->getUser())
->addNavigationItems($menu);
return $menu;
}
2011-01-23 03:33:00 +01:00
}