Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / calendar / xaction / PhabricatorCalendarExportNameTransaction.php
blob8d624c4a69e72cf6f917500b3661b34bc44c0ee3
1 <?php
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() {
17 return pht(
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) {
25 $errors = array();
27 if ($this->isEmptyTextTransaction($object->getName(), $xactions)) {
28 $errors[] = $this->newRequiredError(
29 pht('Calendar exports must have a name.'));
32 return $errors;