mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
c2ac63e9ad
Summary: Ref T6822. This method needs to be `public` because it is called from `PhabricatorApplicationSearchController::buildApplicationMenu()`. Test Plan: I wouldn't expect //increasing// method visibility to break anything. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11416
29 lines
678 B
PHP
29 lines
678 B
PHP
<?php
|
|
|
|
abstract class PhabricatorFileController extends PhabricatorController {
|
|
|
|
protected function buildSideNavView() {
|
|
$menu = $this->buildMenu($for_devices = false);
|
|
return AphrontSideNavFilterView::newFromMenu($menu);
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildMenu($for_devices = true);
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
}
|