Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / calendar / xaction / PhabricatorCalendarEventNameTransaction.php
blob64fbd8401046f0cf09c9557680808f0452cb6fc7
1 <?php
3 final class PhabricatorCalendarEventNameTransaction
4 extends PhabricatorCalendarEventTransactionType {
6 const TRANSACTIONTYPE = 'calendar.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 event from %s to %s.',
19 $this->renderAuthor(),
20 $this->renderOldValue(),
21 $this->renderNewValue());
24 public function getTitleForFeed() {
25 return pht(
26 '%s renamed %s from %s to %s.',
27 $this->renderAuthor(),
28 $this->renderObject(),
29 $this->renderOldValue(),
30 $this->renderNewValue());
33 public function validateTransactions($object, array $xactions) {
34 $errors = array();
36 if ($this->isEmptyTextTransaction($object->getName(), $xactions)) {
37 $errors[] = $this->newRequiredError(
38 pht('Events must have a name.'));
41 return $errors;