[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorProjectColumnTransaction 4 extends PhabricatorApplicationTransaction { 5 6 const TYPE_NAME = 'project:col:name'; 7 const TYPE_STATUS = 'project:col:status'; 8 const TYPE_LIMIT = 'project:col:limit'; 9 10 public function getApplicationName() { 11 return 'project'; 12 } 13 14 public function getApplicationTransactionType() { 15 return PhabricatorProjectColumnPHIDType::TYPECONST; 16 } 17 18 public function getTitle() { 19 $old = $this->getOldValue(); 20 $new = $this->getNewValue(); 21 $author_handle = $this->renderHandleLink($this->getAuthorPHID()); 22 23 switch ($this->getTransactionType()) { 24 case PhabricatorProjectColumnTransaction::TYPE_NAME: 25 if ($old === null) { 26 return pht( 27 '%s created this column.', 28 $author_handle); 29 } else { 30 if (!strlen($old)) { 31 return pht( 32 '%s named this column "%s".', 33 $author_handle, 34 $new); 35 } else if (strlen($new)) { 36 return pht( 37 '%s renamed this column from "%s" to "%s".', 38 $author_handle, 39 $old, 40 $new); 41 } else { 42 return pht( 43 '%s removed the custom name of this column.', 44 $author_handle); 45 } 46 } 47 case PhabricatorProjectColumnTransaction::TYPE_LIMIT: 48 if (!$old) { 49 return pht( 50 '%s set the point limit for this column to %s.', 51 $author_handle, 52 $new); 53 } else if (!$new) { 54 return pht( 55 '%s removed the point limit for this column.', 56 $author_handle); 57 } else { 58 return pht( 59 '%s changed point limit for this column from %s to %s.', 60 $author_handle, 61 $old, 62 $new); 63 } 64 65 case PhabricatorProjectColumnTransaction::TYPE_STATUS: 66 switch ($new) { 67 case PhabricatorProjectColumn::STATUS_ACTIVE: 68 return pht( 69 '%s marked this column visible.', 70 $author_handle); 71 case PhabricatorProjectColumn::STATUS_HIDDEN: 72 return pht( 73 '%s marked this column hidden.', 74 $author_handle); 75 } 76 break; 77 } 78 79 return parent::getTitle(); 80 } 81 82 }
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 |