Path: blob/master/src/applications/differential/storage/DifferentialDiffTransaction.php
12256 views
<?php12final class DifferentialDiffTransaction3extends PhabricatorApplicationTransaction {45const TYPE_DIFF_CREATE = 'differential:diff:create';67public function getApplicationName() {8return 'differential';9}1011public function getApplicationTransactionType() {12return DifferentialDiffPHIDType::TYPECONST;13}1415public function shouldHideForMail(array $xactions) {16return true;17}1819public function getActionName() {20switch ($this->getTransactionType()) {21case self::TYPE_DIFF_CREATE;22return pht('Created');23}2425return parent::getActionName();26}2728public function getTitle() {29$author_phid = $this->getAuthorPHID();30$author_handle = $this->renderHandleLink($author_phid);3132$old = $this->getOldValue();33$new = $this->getNewValue();3435switch ($this->getTransactionType()) {36case self::TYPE_DIFF_CREATE;37return pht(38'%s created this diff.',39$author_handle);40}4142return parent::getTitle();43}4445public function getIcon() {46switch ($this->getTransactionType()) {47case self::TYPE_DIFF_CREATE:48return 'fa-refresh';49}5051return parent::getIcon();52}5354public function getColor() {55switch ($this->getTransactionType()) {56case self::TYPE_DIFF_CREATE:57return PhabricatorTransactions::COLOR_SKY;58}5960return parent::getColor();61}6263}646566