1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/drydock/storage/DrydockBlueprintTransaction.php

40 lines
900 B
PHP
Raw Normal View History

<?php
final class DrydockBlueprintTransaction
extends PhabricatorApplicationTransaction {
const TYPE_NAME = 'drydock:blueprint:name';
public function getApplicationName() {
return 'drydock';
}
public function getApplicationTransactionType() {
return DrydockPHIDTypeBlueprint::TYPECONST;
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
$author_handle = $this->renderHandleLink($this->getAuthorPHID());
switch ($this->getTransactionType()) {
case self::TYPE_NAME:
if (!strlen($old)) {
return pht(
'%s created this blueprint.',
$author_handle);
} else {
return pht(
'%s renamed this blueprint from "%s" to "%s".',
$author_handle,
$old,
$new);
}
}
return parent::getTitle();
}
}