Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / conpherence / controller / ConpherenceRoomListController.php
blob0e23c89a270c5adc95ad41dc2949ddd924bc2f1f
1 <?php
3 final class ConpherenceRoomListController extends ConpherenceController {
5 public function shouldAllowPublic() {
6 return true;
9 public function handleRequest(AphrontRequest $request) {
10 $user = $request->getUser();
12 $controller = id(new PhabricatorApplicationSearchController())
13 ->setQueryKey($request->getURIData('queryKey'))
14 ->setSearchEngine(
15 new ConpherenceThreadSearchEngine())
16 ->setNavigation($this->buildRoomsSideNavView());
18 return $this->delegateToController($controller);
21 public function buildApplicationMenu() {
22 return $this->buildRoomsSideNavView(true)->getMenu();
25 private function buildRoomsSideNavView($for_app = false) {
26 $user = $this->getRequest()->getUser();
28 $nav = new AphrontSideNavFilterView();
29 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
31 if ($for_app) {
32 $nav->addFilter('new/', pht('Create Room'));
35 id(new ConpherenceThreadSearchEngine())
36 ->setViewer($user)
37 ->addNavigationItems($nav->getMenu());
39 $nav->selectFilter(null);
41 return $nav;