[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorCommitBranchesField 4 extends PhabricatorCommitCustomField { 5 6 public function getFieldKey() { 7 return 'diffusion:branches'; 8 } 9 10 public function shouldAppearInApplicationTransactions() { 11 return true; 12 } 13 14 public function buildApplicationTransactionMailBody( 15 PhabricatorApplicationTransaction $xaction, 16 PhabricatorMetaMTAMailBody $body) { 17 18 $params = array( 19 'contains' => $this->getObject()->getCommitIdentifier(), 20 'callsign' => $this->getObject()->getRepository()->getCallsign(), 21 ); 22 23 $branches_raw = id(new ConduitCall('diffusion.branchquery', $params)) 24 ->setUser($this->getViewer()) 25 ->execute(); 26 27 $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches_raw); 28 if (!$branches) { 29 return; 30 } 31 $branch_names = mpull($branches, 'getShortName'); 32 sort($branch_names); 33 34 $body->addTextSection(pht('BRANCHES'), implode(', ', $branch_names)); 35 } 36 37 }
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 |