Remove getApplicationObjectTypeName from ApplicationTransactions
Summary: We can get this out of PHIDType reasonably in all cases and simplify implementation here. None of these translate correctly anyway so they're basically debugging/development strings. Test Plan: `grep`, browsed some transactions Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D6786
This commit is contained in:
@@ -34,10 +34,6 @@ final class PhabricatorAuthProviderConfigTransaction
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('authentication provider');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getIcon() {
|
public function getIcon() {
|
||||||
$old = $this->getOldValue();
|
$old = $this->getOldValue();
|
||||||
$new = $this->getNewValue();
|
$new = $this->getNewValue();
|
||||||
|
|||||||
@@ -17,11 +17,6 @@ final class PhabricatorConfigTransaction
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('config');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
|
|||||||
return new ConpherenceTransactionComment();
|
return new ConpherenceTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('conpherence');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getNoEffectDescription() {
|
public function getNoEffectDescription() {
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
|
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
|
||||||
|
|||||||
@@ -14,8 +14,4 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
|
|||||||
return new DifferentialTransactionComment();
|
return new DifferentialTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('revision');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,5 @@ final class HeraldRuleTransaction
|
|||||||
return new HeraldRuleTransactionComment();
|
return new HeraldRuleTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('rule');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ final class LegalpadTransaction extends PhabricatorApplicationTransaction {
|
|||||||
return new LegalpadTransactionView();
|
return new LegalpadTransactionView();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('document');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function shouldHide() {
|
public function shouldHide() {
|
||||||
$old = $this->getOldValue();
|
$old = $this->getOldValue();
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ final class PhabricatorMacroTransaction
|
|||||||
return new PhabricatorMacroTransactionComment();
|
return new PhabricatorMacroTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('macro');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRequiredHandlePHIDs() {
|
public function getRequiredHandlePHIDs() {
|
||||||
$phids = parent::getRequiredHandlePHIDs();
|
$phids = parent::getRequiredHandlePHIDs();
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ final class PhabricatorPasteTransaction
|
|||||||
return new PhabricatorPasteTransactionComment();
|
return new PhabricatorPasteTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('paste');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRequiredHandlePHIDs() {
|
public function getRequiredHandlePHIDs() {
|
||||||
$phids = parent::getRequiredHandlePHIDs();
|
$phids = parent::getRequiredHandlePHIDs();
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,5 @@ final class PhabricatorUserTransaction
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('user');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ final class PhluxTransaction extends PhabricatorApplicationTransaction {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('variable');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ final class PholioTransaction extends PhabricatorApplicationTransaction {
|
|||||||
return new PholioTransactionView();
|
return new PholioTransactionView();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('mock');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRequiredHandlePHIDs() {
|
public function getRequiredHandlePHIDs() {
|
||||||
$phids = parent::getRequiredHandlePHIDs();
|
$phids = parent::getRequiredHandlePHIDs();
|
||||||
$phids[] = $this->getObjectPHID();
|
$phids[] = $this->getObjectPHID();
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ final class PhortuneAccountTransaction
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('account');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ final class PhortuneProductTransaction
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('product');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ final class PonderAnswerTransaction
|
|||||||
return new PonderAnswerTransactionComment();
|
return new PonderAnswerTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('answer');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitleForFeed() {
|
public function getTitleForFeed() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
$object_phid = $this->getObjectPHID();
|
$object_phid = $this->getObjectPHID();
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ final class PonderQuestionTransaction
|
|||||||
return new PonderQuestionTransactionComment();
|
return new PonderQuestionTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('question');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,5 @@ final class ReleephBranchTransaction
|
|||||||
return ReleephPHIDTypeBranch::TYPECONST;
|
return ReleephPHIDTypeBranch::TYPECONST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('branch');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,5 @@ final class ReleephProjectTransaction
|
|||||||
return ReleephPHIDTypeProject::TYPECONST;
|
return ReleephPHIDTypeProject::TYPECONST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('project');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ final class ReleephRequestTransaction
|
|||||||
return new ReleephRequestTransactionComment();
|
return new ReleephRequestTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('releeph request');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function hasChangeDetails() {
|
public function hasChangeDetails() {
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
default;
|
default;
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ final class PhabricatorRepositoryTransaction
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('repository');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ final class PhabricatorSlowvoteTransaction
|
|||||||
return new PhabricatorSlowvoteTransactionComment();
|
return new PhabricatorSlowvoteTransactionComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getApplicationObjectTypeName() {
|
|
||||||
return pht('vote');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function shouldHide() {
|
public function shouldHide() {
|
||||||
$old = $this->getOldValue();
|
$old = $this->getOldValue();
|
||||||
$new = $this->getNewValue();
|
$new = $this->getNewValue();
|
||||||
|
|||||||
@@ -30,7 +30,17 @@ abstract class PhabricatorApplicationTransaction
|
|||||||
private $transactionGroup = array();
|
private $transactionGroup = array();
|
||||||
|
|
||||||
abstract public function getApplicationTransactionType();
|
abstract public function getApplicationTransactionType();
|
||||||
abstract public function getApplicationObjectTypeName();
|
|
||||||
|
private function getApplicationObjectTypeName() {
|
||||||
|
$types = PhabricatorPHIDType::getAllTypes();
|
||||||
|
|
||||||
|
$type = idx($types, $this->getApplicationTransactionType());
|
||||||
|
if ($type) {
|
||||||
|
return $type->getTypeName();
|
||||||
|
}
|
||||||
|
|
||||||
|
return pht('Object');
|
||||||
|
}
|
||||||
|
|
||||||
public function getApplicationTransactionCommentObject() {
|
public function getApplicationTransactionCommentObject() {
|
||||||
throw new Exception("Not implemented!");
|
throw new Exception("Not implemented!");
|
||||||
|
|||||||
Reference in New Issue
Block a user