[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhluxTransaction extends PhabricatorApplicationTransaction { 4 5 const TYPE_EDIT_KEY = 'phlux:key'; 6 const TYPE_EDIT_VALUE = 'phlux:value'; 7 8 public function getApplicationName() { 9 return 'phlux'; 10 } 11 12 public function getApplicationTransactionType() { 13 return PhluxVariablePHIDType::TYPECONST; 14 } 15 16 public function getApplicationTransactionCommentObject() { 17 return null; 18 } 19 20 public function getTitle() { 21 $author_phid = $this->getAuthorPHID(); 22 23 switch ($this->getTransactionType()) { 24 case self::TYPE_EDIT_KEY: 25 return pht( 26 '%s created this variable.', 27 $this->renderHandleLink($author_phid)); 28 case self::TYPE_EDIT_VALUE: 29 return pht( 30 '%s updated this variable.', 31 $this->renderHandleLink($author_phid)); 32 } 33 34 return parent::getTitle(); 35 } 36 37 public function hasChangeDetails() { 38 switch ($this->getTransactionType()) { 39 case self::TYPE_EDIT_VALUE: 40 return true; 41 } 42 return parent::hasChangeDetails(); 43 } 44 45 public function renderChangeDetails(PhabricatorUser $viewer) { 46 return $this->renderTextCorpusChangeDetails( 47 $viewer, 48 json_encode($this->getOldValue()), 49 json_encode($this->getNewValue())); 50 } 51 52 53 }
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 |