mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
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:
parent
8769759c15
commit
f034fd80db
21 changed files with 11 additions and 82 deletions
|
@ -34,10 +34,6 @@ final class PhabricatorAuthProviderConfigTransaction
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('authentication provider');
|
||||
}
|
||||
|
||||
public function getIcon() {
|
||||
$old = $this->getOldValue();
|
||||
$new = $this->getNewValue();
|
||||
|
|
|
@ -17,11 +17,6 @@ final class PhabricatorConfigTransaction
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('config');
|
||||
}
|
||||
|
||||
|
||||
public function getTitle() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
|
|||
return new ConpherenceTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('conpherence');
|
||||
}
|
||||
|
||||
public function getNoEffectDescription() {
|
||||
switch ($this->getTransactionType()) {
|
||||
case ConpherenceTransactionType::TYPE_PARTICIPANTS:
|
||||
|
|
|
@ -14,8 +14,4 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
|
|||
return new DifferentialTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('revision');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,9 +17,5 @@ final class HeraldRuleTransaction
|
|||
return new HeraldRuleTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('rule');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,6 @@ final class LegalpadTransaction extends PhabricatorApplicationTransaction {
|
|||
return new LegalpadTransactionView();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('document');
|
||||
}
|
||||
|
||||
public function shouldHide() {
|
||||
$old = $this->getOldValue();
|
||||
|
||||
|
|
|
@ -19,10 +19,6 @@ final class PhabricatorMacroTransaction
|
|||
return new PhabricatorMacroTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('macro');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDs() {
|
||||
$phids = parent::getRequiredHandlePHIDs();
|
||||
|
||||
|
|
|
@ -22,10 +22,6 @@ final class PhabricatorPasteTransaction
|
|||
return new PhabricatorPasteTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('paste');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDs() {
|
||||
$phids = parent::getRequiredHandlePHIDs();
|
||||
|
||||
|
|
|
@ -15,9 +15,5 @@ final class PhabricatorUserTransaction
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('user');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ final class PhluxTransaction extends PhabricatorApplicationTransaction {
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('variable');
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
|
||||
|
|
|
@ -21,10 +21,6 @@ final class PholioTransaction extends PhabricatorApplicationTransaction {
|
|||
return new PholioTransactionView();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('mock');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDs() {
|
||||
$phids = parent::getRequiredHandlePHIDs();
|
||||
$phids[] = $this->getObjectPHID();
|
||||
|
|
|
@ -17,10 +17,6 @@ final class PhortuneAccountTransaction
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('account');
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
|
||||
|
|
|
@ -19,10 +19,6 @@ final class PhortuneProductTransaction
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('product');
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
|
||||
|
|
|
@ -21,10 +21,6 @@ final class PonderAnswerTransaction
|
|||
return new PonderAnswerTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('answer');
|
||||
}
|
||||
|
||||
public function getTitleForFeed() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
$object_phid = $this->getObjectPHID();
|
||||
|
|
|
@ -24,10 +24,6 @@ final class PonderQuestionTransaction
|
|||
return new PonderQuestionTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('question');
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
|
||||
|
|
|
@ -11,9 +11,5 @@ final class ReleephBranchTransaction
|
|||
return ReleephPHIDTypeBranch::TYPECONST;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('branch');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,5 @@ final class ReleephProjectTransaction
|
|||
return ReleephPHIDTypeProject::TYPECONST;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('project');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,6 @@ final class ReleephRequestTransaction
|
|||
return new ReleephRequestTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('releeph request');
|
||||
}
|
||||
|
||||
public function hasChangeDetails() {
|
||||
switch ($this->getTransactionType()) {
|
||||
default;
|
||||
|
|
|
@ -19,10 +19,6 @@ final class PhabricatorRepositoryTransaction
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('repository');
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
$author_phid = $this->getAuthorPHID();
|
||||
|
||||
|
|
|
@ -20,10 +20,6 @@ final class PhabricatorSlowvoteTransaction
|
|||
return new PhabricatorSlowvoteTransactionComment();
|
||||
}
|
||||
|
||||
public function getApplicationObjectTypeName() {
|
||||
return pht('vote');
|
||||
}
|
||||
|
||||
public function shouldHide() {
|
||||
$old = $this->getOldValue();
|
||||
$new = $this->getNewValue();
|
||||
|
|
|
@ -30,7 +30,17 @@ abstract class PhabricatorApplicationTransaction
|
|||
private $transactionGroup = array();
|
||||
|
||||
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() {
|
||||
throw new Exception("Not implemented!");
|
||||
|
|
Loading…
Reference in a new issue