Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / differential / storage / DifferentialDiffTransaction.php
blob430638c3c2dcf10dd341a1a3c8162bd8d6d3a4de
1 <?php
3 final class DifferentialDiffTransaction
4 extends PhabricatorApplicationTransaction {
6 const TYPE_DIFF_CREATE = 'differential:diff:create';
8 public function getApplicationName() {
9 return 'differential';
12 public function getApplicationTransactionType() {
13 return DifferentialDiffPHIDType::TYPECONST;
16 public function shouldHideForMail(array $xactions) {
17 return true;
20 public function getActionName() {
21 switch ($this->getTransactionType()) {
22 case self::TYPE_DIFF_CREATE;
23 return pht('Created');
26 return parent::getActionName();
29 public function getTitle() {
30 $author_phid = $this->getAuthorPHID();
31 $author_handle = $this->renderHandleLink($author_phid);
33 $old = $this->getOldValue();
34 $new = $this->getNewValue();
36 switch ($this->getTransactionType()) {
37 case self::TYPE_DIFF_CREATE;
38 return pht(
39 '%s created this diff.',
40 $author_handle);
43 return parent::getTitle();
46 public function getIcon() {
47 switch ($this->getTransactionType()) {
48 case self::TYPE_DIFF_CREATE:
49 return 'fa-refresh';
52 return parent::getIcon();
55 public function getColor() {
56 switch ($this->getTransactionType()) {
57 case self::TYPE_DIFF_CREATE:
58 return PhabricatorTransactions::COLOR_SKY;
61 return parent::getColor();