[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/releeph/controller/branch/ -> ReleephBranchHistoryController.php (source)

   1  <?php
   2  
   3  final class ReleephBranchHistoryController extends ReleephBranchController {
   4  
   5    private $branchID;
   6  
   7    public function shouldAllowPublic() {
   8      return true;
   9    }
  10  
  11    public function willProcessRequest(array $data) {
  12      $this->branchID = $data['branchID'];
  13    }
  14  
  15    public function processRequest() {
  16      $request = $this->getRequest();
  17      $viewer = $request->getUser();
  18  
  19      $branch = id(new ReleephBranchQuery())
  20        ->setViewer($viewer)
  21        ->withIDs(array($this->branchID))
  22        ->executeOne();
  23      if (!$branch) {
  24        return new Aphront404Response();
  25      }
  26      $this->setBranch($branch);
  27  
  28      $xactions = id(new ReleephBranchTransactionQuery())
  29        ->setViewer($viewer)
  30        ->withObjectPHIDs(array($branch->getPHID()))
  31        ->execute();
  32  
  33      $timeline = id(new PhabricatorApplicationTransactionView())
  34        ->setUser($viewer)
  35        ->setObjectPHID($branch->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('Branch History'),
  49        ));
  50    }
  51  
  52  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1