3 final class PhabricatorCalendarEventAllDayTransaction
4 extends PhabricatorCalendarEventTransactionType
{
6 const TRANSACTIONTYPE
= 'calendar.allday';
8 public function generateOldValue($object) {
9 return (int)$object->getIsAllDay();
12 public function generateNewValue($object, $value) {
16 public function applyInternalEffects($object, $value) {
17 $object->setIsAllDay($value);
19 // Adjust the flags on any other dates the event has.
26 foreach ($keys as $key) {
27 $dict = $object->getParameter($key);
32 $datetime = PhutilCalendarAbsoluteDateTime
::newFromDictionary($dict);
33 $datetime->setIsAllDay($value);
35 $object->setParameter($key, $datetime->toDictionary());
39 public function getTitle() {
40 if ($this->getNewValue()) {
42 '%s changed this to an all day event.',
43 $this->renderAuthor());
46 '%s converted this from an all day event.',
47 $this->renderAuthor());
51 public function getTitleForFeed() {
52 if ($this->getNewValue()) {
54 '%s changed %s to an all day event.',
55 $this->renderAuthor(),
56 $this->renderObject());
59 '%s converted %s from an all day event.',
60 $this->renderAuthor(),
61 $this->renderObject());