Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / diffusion / controller / DiffusionRepositoryListController.php
blob66226e5eab4fa0e51d95fe4f7f5337607032276e
1 <?php
3 final class DiffusionRepositoryListController extends DiffusionController {
5 public function shouldAllowPublic() {
6 return true;
9 public function handleRequest(AphrontRequest $request) {
10 $items = array();
12 $items[] = id(new PHUIListItemView())
13 ->setType(PHUIListItemView::TYPE_LABEL)
14 ->setName(pht('Commits'));
16 $items[] = id(new PHUIListItemView())
17 ->setName(pht('Browse Commits'))
18 ->setHref($this->getApplicationURI('commit/'));
20 $items[] = id(new PHUIListItemView())
21 ->setType(PHUIListItemView::TYPE_LABEL)
22 ->setName(pht('Identities'));
24 $items[] = id(new PHUIListItemView())
25 ->setName(pht('Browse Identities'))
26 ->setHref($this->getApplicationURI('identity/'));
28 return id(new PhabricatorRepositorySearchEngine())
29 ->setController($this)
30 ->setNavigationItems($items)
31 ->buildResponse();
34 protected function buildApplicationCrumbs() {
35 $crumbs = parent::buildApplicationCrumbs();
37 id(new DiffusionRepositoryEditEngine())
38 ->setViewer($this->getViewer())
39 ->addActionToCrumbs($crumbs);
41 return $crumbs;