Path: blob/master/src/applications/calendar/xaction/PhabricatorCalendarImportNameTransaction.php
12256 views
<?php12final class PhabricatorCalendarImportNameTransaction3extends PhabricatorCalendarImportTransactionType {45const TRANSACTIONTYPE = 'calendar.import.name';67public function generateOldValue($object) {8return $object->getName();9}1011public function applyInternalEffects($object, $value) {12$object->setName($value);13}1415public function getTitle() {16$old = $this->getOldValue();17$new = $this->getNewValue();1819if (!strlen($old)) {20return pht(21'%s named this import %s.',22$this->renderAuthor(),23$this->renderNewValue());24} else if (!strlen($new)) {25return pht(26'%s removed the name of this import (was: %s).',27$this->renderAuthor(),28$this->renderOldValue());29} else {30return pht(31'%s renamed this import from %s to %s.',32$this->renderAuthor(),33$this->renderOldValue(),34$this->renderNewValue());35}36}3738}394041