mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 04:02:43 +01:00
6f95b325c6
Summary: Ref T7199. This needs some polish and isn't reachable from the UI, but technically has all of the information. Test Plan: {F355899} {F355900} Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7199 Differential Revision: https://secure.phabricator.com/D12241
33 lines
801 B
PHP
33 lines
801 B
PHP
<?php
|
|
|
|
abstract class PhabricatorApplicationsController extends PhabricatorController {
|
|
|
|
public function buildSideNavView($for_app = false) {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
id(new PhabricatorAppSearchEngine())
|
|
->setViewer($user)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView(true)->getMenu();
|
|
}
|
|
|
|
protected function addApplicationCrumb(
|
|
PHUICrumbsView $crumbs,
|
|
PhabricatorApplication $application) {
|
|
|
|
$crumbs->addTextCrumb(
|
|
$application->getName(),
|
|
'/applications/view/'.get_class($application).'/');
|
|
}
|
|
|
|
}
|