Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / calendar / xaction / PhabricatorCalendarImportNameTransaction.php
blob49705af009c7d69dddccd177afcb0d542c98a5f0
1 <?php
3 final class PhabricatorCalendarImportNameTransaction
4 extends PhabricatorCalendarImportTransactionType {
6 const TRANSACTIONTYPE = 'calendar.import.name';
8 public function generateOldValue($object) {
9 return $object->getName();
12 public function applyInternalEffects($object, $value) {
13 $object->setName($value);
16 public function getTitle() {
17 $old = $this->getOldValue();
18 $new = $this->getNewValue();
20 if (!strlen($old)) {
21 return pht(
22 '%s named this import %s.',
23 $this->renderAuthor(),
24 $this->renderNewValue());
25 } else if (!strlen($new)) {
26 return pht(
27 '%s removed the name of this import (was: %s).',
28 $this->renderAuthor(),
29 $this->renderOldValue());
30 } else {
31 return pht(
32 '%s renamed this import from %s to %s.',
33 $this->renderAuthor(),
34 $this->renderOldValue(),
35 $this->renderNewValue());