[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/differential/storage/ -> DifferentialDiffTransaction.php (source)

   1  <?php
   2  
   3  final class DifferentialDiffTransaction
   4    extends PhabricatorApplicationTransaction {
   5  
   6    const TYPE_DIFF_CREATE = 'differential:diff:create';
   7  
   8    public function getApplicationName() {
   9      return 'differential';
  10    }
  11  
  12    public function getApplicationTransactionType() {
  13      return DifferentialDiffPHIDType::TYPECONST;
  14    }
  15  
  16    public function shouldHideForMail(array $xactions) {
  17      return true;
  18    }
  19  
  20    public function getActionName() {
  21      switch ($this->getTransactionType()) {
  22        case self::TYPE_DIFF_CREATE;
  23          return pht('Created');
  24      }
  25  
  26      return parent::getActionName();
  27    }
  28  
  29    public function getTitle() {
  30      $author_phid = $this->getAuthorPHID();
  31      $author_handle = $this->renderHandleLink($author_phid);
  32  
  33      $old = $this->getOldValue();
  34      $new = $this->getNewValue();
  35  
  36      switch ($this->getTransactionType()) {
  37        case self::TYPE_DIFF_CREATE;
  38          return pht(
  39            '%s created this diff.',
  40            $author_handle);
  41      }
  42  
  43      return parent::getTitle();
  44    }
  45  
  46    public function getIcon() {
  47      switch ($this->getTransactionType()) {
  48        case self::TYPE_DIFF_CREATE:
  49          return 'fa-refresh';
  50      }
  51  
  52      return parent::getIcon();
  53    }
  54  
  55    public function getColor() {
  56      switch ($this->getTransactionType()) {
  57        case self::TYPE_DIFF_CREATE:
  58          return PhabricatorTransactions::COLOR_SKY;
  59      }
  60  
  61      return parent::getColor();
  62    }
  63  
  64  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1