3 final class PhabricatorCalendarExportNameTransaction
4 extends PhabricatorCalendarExportTransactionType
{
6 const TRANSACTIONTYPE
= 'calendar.export.name';
8 public function generateOldValue($object) {
9 return $object->getName();
12 public function applyInternalEffects($object, $value) {
13 $object->setName($value);
16 public function getTitle() {
18 '%s renamed this export from %s to %s.',
19 $this->renderAuthor(),
20 $this->renderOldValue(),
21 $this->renderNewValue());
24 public function validateTransactions($object, array $xactions) {
27 if ($this->isEmptyTextTransaction($object->getName(), $xactions)) {
28 $errors[] = $this->newRequiredError(
29 pht('Calendar exports must have a name.'));