[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class ReleephProductHistoryController extends ReleephProductController { 4 5 private $id; 6 7 public function shouldAllowPublic() { 8 return true; 9 } 10 11 public function willProcessRequest(array $data) { 12 $this->id = $data['projectID']; 13 } 14 15 public function processRequest() { 16 $request = $this->getRequest(); 17 $viewer = $request->getUser(); 18 19 $product = id(new ReleephProductQuery()) 20 ->setViewer($viewer) 21 ->withIDs(array($this->id)) 22 ->executeOne(); 23 if (!$product) { 24 return new Aphront404Response(); 25 } 26 $this->setProduct($product); 27 28 $xactions = id(new ReleephProductTransactionQuery()) 29 ->setViewer($viewer) 30 ->withObjectPHIDs(array($product->getPHID())) 31 ->execute(); 32 33 $timeline = id(new PhabricatorApplicationTransactionView()) 34 ->setUser($viewer) 35 ->setObjectPHID($product->getPHID()) 36 ->setTransactions($xactions) 37 ->setShouldTerminate(true); 38 39 $crumbs = $this->buildApplicationCrumbs(); 40 $crumbs->addTextCrumb(pht('History')); 41 42 return $this->buildApplicationPage( 43 array( 44 $crumbs, 45 $timeline, 46 ), 47 array( 48 'title' => pht('Product History'), 49 )); 50 } 51 52 }
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 |