[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class AlmanacBindingTransaction 4 extends PhabricatorApplicationTransaction { 5 6 const TYPE_INTERFACE = 'almanac:binding:interface'; 7 8 public function getApplicationName() { 9 return 'almanac'; 10 } 11 12 public function getApplicationTransactionType() { 13 return AlmanacBindingPHIDType::TYPECONST; 14 } 15 16 public function getApplicationTransactionCommentObject() { 17 return null; 18 } 19 20 public function getRequiredHandlePHIDs() { 21 $phids = parent::getRequiredHandlePHIDs(); 22 23 $old = $this->getOldValue(); 24 $new = $this->getNewValue(); 25 26 switch ($this->getTransactionType()) { 27 case self::TYPE_INTERFACE: 28 if ($old) { 29 $phids[] = $old; 30 } 31 if ($new) { 32 $phids[] = $new; 33 } 34 break; 35 } 36 37 return $phids; 38 } 39 40 public function getTitle() { 41 $author_phid = $this->getAuthorPHID(); 42 43 $old = $this->getOldValue(); 44 $new = $this->getNewValue(); 45 46 switch ($this->getTransactionType()) { 47 case self::TYPE_INTERFACE: 48 if ($old === null) { 49 return pht( 50 '%s created this binding.', 51 $this->renderHandleLink($author_phid)); 52 } else { 53 return pht( 54 '%s changed this binding from %s to %s.', 55 $this->renderHandleLink($author_phid), 56 $this->renderHandleLink($old), 57 $this->renderHandleLink($new)); 58 } 59 break; 60 } 61 62 return parent::getTitle(); 63 } 64 65 }
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 |