Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialTransaction.php
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
if ($old === null) { | if ($old === null) { | ||||
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_REVIEW_REQUEST; | $tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_REVIEW_REQUEST; | ||||
} else { | } else { | ||||
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_UPDATED; | $tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_UPDATED; | ||||
} | } | ||||
break; | break; | ||||
case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
switch ($this->getMetadataValue('edge:type')) { | switch ($this->getMetadataValue('edge:type')) { | ||||
case PhabricatorEdgeConfig::TYPE_DREV_HAS_REVIEWER: | case DifferentialRevisionHasReviewerEdgeType::EDGECONST: | ||||
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_REVIEWERS; | $tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_REVIEWERS; | ||||
break; | break; | ||||
} | } | ||||
break; | break; | ||||
case PhabricatorTransactions::TYPE_COMMENT: | case PhabricatorTransactions::TYPE_COMMENT: | ||||
case self::TYPE_INLINE: | case self::TYPE_INLINE: | ||||
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMENT; | $tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMENT; | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
return 'fa-bullhorn'; | return 'fa-bullhorn'; | ||||
case DifferentialAction::ACTION_RESIGN: | case DifferentialAction::ACTION_RESIGN: | ||||
return 'fa-flag'; | return 'fa-flag'; | ||||
case DifferentialAction::ACTION_CLAIM: | case DifferentialAction::ACTION_CLAIM: | ||||
return 'fa-flag'; | return 'fa-flag'; | ||||
} | } | ||||
case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
switch ($this->getMetadataValue('edge:type')) { | switch ($this->getMetadataValue('edge:type')) { | ||||
case PhabricatorEdgeConfig::TYPE_DREV_HAS_REVIEWER: | case DifferentialRevisionHasReviewerEdgeType::EDGECONST: | ||||
return 'fa-user'; | return 'fa-user'; | ||||
} | } | ||||
} | } | ||||
return parent::getIcon(); | return parent::getIcon(); | ||||
} | } | ||||
public function shouldDisplayGroupWith(array $group) { | public function shouldDisplayGroupWith(array $group) { | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public function getColor() { | ||||
return parent::getColor(); | return parent::getColor(); | ||||
} | } | ||||
public function getNoEffectDescription() { | public function getNoEffectDescription() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
switch ($this->getMetadataValue('edge:type')) { | switch ($this->getMetadataValue('edge:type')) { | ||||
case PhabricatorEdgeConfig::TYPE_DREV_HAS_REVIEWER: | case DifferentialRevisionHasReviewerEdgeType::EDGECONST: | ||||
return pht( | return pht( | ||||
'The reviewers you are trying to add are already reviewing '. | 'The reviewers you are trying to add are already reviewing '. | ||||
'this revision.'); | 'this revision.'); | ||||
} | } | ||||
break; | break; | ||||
case DifferentialTransaction::TYPE_ACTION: | case DifferentialTransaction::TYPE_ACTION: | ||||
switch ($this->getNewValue()) { | switch ($this->getNewValue()) { | ||||
case DifferentialAction::ACTION_CLOSE: | case DifferentialAction::ACTION_CLOSE: | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |