[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/phortune/storage/ -> PhortuneAccountTransaction.php (source)

   1  <?php
   2  
   3  final class PhortuneAccountTransaction
   4    extends PhabricatorApplicationTransaction {
   5  
   6    const TYPE_NAME   = 'phortune:name';
   7  
   8    public function getApplicationName() {
   9      return 'phortune';
  10    }
  11  
  12    public function getApplicationTransactionType() {
  13      return PhortuneAccountPHIDType::TYPECONST;
  14    }
  15  
  16    public function getApplicationTransactionCommentObject() {
  17      return null;
  18    }
  19  
  20    public function getTitle() {
  21      $author_phid = $this->getAuthorPHID();
  22  
  23      $old = $this->getOldValue();
  24      $new = $this->getNewValue();
  25  
  26      switch ($this->getTransactionType()) {
  27        case self::TYPE_NAME:
  28          if ($old === null) {
  29            return pht(
  30              '%s created this account.',
  31              $this->renderHandleLink($author_phid));
  32          } else {
  33            return pht(
  34              '%s renamed this account from "%s" to "%s".',
  35              $this->renderHandleLink($author_phid),
  36              $old,
  37              $new);
  38          }
  39          break;
  40      }
  41  
  42      return parent::getTitle();
  43    }
  44  
  45  }


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