[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorDashboardHistoryController 4 extends PhabricatorDashboardController { 5 6 private $id; 7 8 public function willProcessRequest(array $data) { 9 $this->id = $data['id']; 10 } 11 12 public function processRequest() { 13 $request = $this->getRequest(); 14 $viewer = $request->getUser(); 15 $id = $this->id; 16 $dashboard_view_uri = $this->getApplicationURI('view/'.$id.'/'); 17 $dashboard_manage_uri = $this->getApplicationURI('manage/'.$id.'/'); 18 19 $dashboard = id(new PhabricatorDashboardQuery()) 20 ->setViewer($viewer) 21 ->withIDs(array($this->id)) 22 ->executeOne(); 23 if (!$dashboard) { 24 return new Aphront404Response(); 25 } 26 27 $title = $dashboard->getName(); 28 29 $crumbs = $this->buildApplicationCrumbs(); 30 $crumbs->addTextCrumb( 31 pht('Dashboard %d', $dashboard->getID()), 32 $dashboard_view_uri); 33 $crumbs->addTextCrumb( 34 pht('Manage'), 35 $dashboard_manage_uri); 36 $crumbs->addTextCrumb(pht('History')); 37 38 $timeline = $this->buildTransactions($dashboard); 39 40 return $this->buildApplicationPage( 41 array( 42 $crumbs, 43 $timeline, 44 ), 45 array( 46 'title' => $title, 47 )); 48 } 49 50 private function buildTransactions(PhabricatorDashboard $dashboard) { 51 $viewer = $this->getRequest()->getUser(); 52 53 $xactions = id(new PhabricatorDashboardTransactionQuery()) 54 ->setViewer($viewer) 55 ->withObjectPHIDs(array($dashboard->getPHID())) 56 ->execute(); 57 58 $timeline = id(new PhabricatorApplicationTransactionView()) 59 ->setUser($viewer) 60 ->setShouldTerminate(true) 61 ->setObjectPHID($dashboard->getPHID()) 62 ->setTransactions($xactions); 63 64 return $timeline; 65 } 66 67 }
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 |