3 final class PhabricatorBadgesRecipientsController
4 extends PhabricatorBadgesProfileController
{
6 public function shouldAllowPublic() {
10 public function handleRequest(AphrontRequest
$request) {
11 $viewer = $request->getViewer();
12 $id = $request->getURIData('id');
14 $badge = id(new PhabricatorBadgesQuery())
19 return new Aphront404Response();
21 $this->setBadge($badge);
23 $awards = id(new PhabricatorBadgesAwardQuery())
25 ->withBadgePHIDs(array($badge->getPHID()))
28 $recipient_phids = mpull($awards, 'getRecipientPHID');
29 $recipient_phids = array_reverse($recipient_phids);
30 $handles = $this->loadViewerHandles($recipient_phids);
32 $crumbs = $this->buildApplicationCrumbs();
33 $crumbs->addTextCrumb(pht('Recipients'));
34 $crumbs->setBorder(true);
35 $title = $badge->getName();
37 $header = $this->buildHeaderView();
39 $recipient_list = id(new PhabricatorBadgesRecipientsListView())
42 ->setHandles($handles)
45 $view = id(new PHUITwoColumnView())
51 $navigation = $this->buildSideNavView('recipients');
53 return $this->newPage()
56 ->setPageObjectPHIDs(array($badge->getPHID()))
57 ->setNavigation($navigation)