1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00
phorge-phorge/src/applications/ponder/storage/PonderAnswerTransaction.php

45 lines
1,011 B
PHP
Raw Normal View History

<?php
final class PonderAnswerTransaction
extends PhabricatorApplicationTransaction {
const TYPE_CONTENT = 'ponder.answer:content';
public function getApplicationName() {
return 'ponder';
}
public function getTableName() {
return 'ponder_answertransaction';
}
public function getApplicationTransactionType() {
return PonderPHIDTypeAnswer::TYPECONST;
}
public function getApplicationTransactionCommentObject() {
return new PonderAnswerTransactionComment();
}
public function getTitleForFeed() {
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_CONTENT:
// TODO: This is not so good.
return pht(
'%s edited their answer to %s',
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid));
}
return $this->getTitle();
}
}