Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / calendar / xaction / PhabricatorCalendarEventCancelTransaction.php
blob10a1fc9531fa5235cb7c3fa1357da231c64096d5
1 <?php
3 final class PhabricatorCalendarEventCancelTransaction
4 extends PhabricatorCalendarEventTransactionType {
6 const TRANSACTIONTYPE = 'calendar.cancel';
8 public function generateOldValue($object) {
9 return (int)$object->getIsCancelled();
12 public function generateNewValue($object, $value) {
13 return (int)$value;
16 public function applyInternalEffects($object, $value) {
17 $object->setIsCancelled($value);
20 public function getTitle() {
21 if ($this->getNewValue()) {
22 return pht(
23 '%s cancelled this event.',
24 $this->renderAuthor());
25 } else {
26 return pht(
27 '%s reinstated this event.',
28 $this->renderAuthor());
32 public function getTitleForFeed() {
33 if ($this->getNewValue()) {
34 return pht(
35 '%s cancelled %s.',
36 $this->renderAuthor(),
37 $this->renderObject());
38 } else {
39 return pht(
40 '%s reinstated %s.',
41 $this->renderAuthor(),
42 $this->renderObject());