[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorSubscriptionsListController 4 extends PhabricatorController { 5 6 private $phid; 7 8 public function willProcessRequest(array $data) { 9 $this->phid = idx($data, 'phid'); 10 } 11 12 public function processRequest() { 13 $request = $this->getRequest(); 14 15 $viewer = $request->getUser(); 16 $phid = $this->phid; 17 18 $object = id(new PhabricatorObjectQuery()) 19 ->setViewer($viewer) 20 ->withPHIDs(array($phid)) 21 ->executeOne(); 22 23 if ($object instanceof PhabricatorSubscribableInterface) { 24 $subscriber_phids = PhabricatorSubscribersQuery::loadSubscribersForPHID( 25 $phid); 26 } else if ($object instanceof ManiphestTask) { 27 $subscriber_phids = $object->getCCPHIDs(); 28 } 29 30 $handle_phids = $subscriber_phids; 31 $handle_phids[] = $phid; 32 33 $handles = id(new PhabricatorHandleQuery()) 34 ->setViewer($viewer) 35 ->withPHIDs($handle_phids) 36 ->execute(); 37 $object_handle = $handles[$phid]; 38 39 $dialog = id(new SubscriptionListDialogBuilder()) 40 ->setViewer($viewer) 41 ->setTitle(pht('Subscribers')) 42 ->setObjectPHID($phid) 43 ->setHandles($handles) 44 ->buildDialog(); 45 46 return id(new AphrontDialogResponse())->setDialog($dialog); 47 } 48 49 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |