Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / chatlog / controller / PhabricatorChatLogChannelListController.php
blob530c26770a22faf42d1084a0ec8952b25ce8be15
1 <?php
3 final class PhabricatorChatLogChannelListController
4 extends PhabricatorChatLogController {
6 public function shouldAllowPublic() {
7 return true;
10 public function handleRequest(AphrontRequest $request) {
11 $viewer = $request->getViewer();
13 $channels = id(new PhabricatorChatLogChannelQuery())
14 ->setViewer($viewer)
15 ->execute();
17 $list = new PHUIObjectItemListView();
18 foreach ($channels as $channel) {
19 $item = id(new PHUIObjectItemView())
20 ->setHeader($channel->getChannelName())
21 ->setHref('/chatlog/channel/'.$channel->getID().'/')
22 ->addAttribute($channel->getServiceName())
23 ->addAttribute($channel->getServiceType());
24 $list->addItem($item);
27 $crumbs = $this
28 ->buildApplicationCrumbs()
29 ->addTextCrumb(pht('Channel List'), $this->getApplicationURI());
31 $box = id(new PHUIObjectBoxView())
32 ->setHeaderText('Channel List')
33 ->setObjectList($list);
35 return $this->newPage()
36 ->setTitle(pht('Channel List'))
37 ->setCrumbs($crumbs)
38 ->appendChild($box);