Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / meta / controller / PhabricatorApplicationsController.php
blob7751e102bec823db8c774034d11f6e500db6a4a9
1 <?php
3 abstract class PhabricatorApplicationsController extends PhabricatorController {
5 public function buildSideNavView($for_app = false) {
6 $user = $this->getRequest()->getUser();
8 $nav = new AphrontSideNavFilterView();
9 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
11 id(new PhabricatorAppSearchEngine())
12 ->setViewer($user)
13 ->addNavigationItems($nav->getMenu());
15 $nav->selectFilter(null);
17 return $nav;
20 public function buildApplicationMenu() {
21 return $this->buildSideNavView(true)->getMenu();
24 protected function addApplicationCrumb(
25 PHUICrumbsView $crumbs,
26 PhabricatorApplication $application) {
28 $crumbs->addTextCrumb(
29 $application->getName(),
30 '/applications/view/'.get_class($application).'/');