3 final class PhabricatorCalendarEventUntilDateTransaction
4 extends PhabricatorCalendarEventDateTransaction
{
6 const TRANSACTIONTYPE
= 'calendar.recurrenceenddate';
8 public function generateOldValue($object) {
9 $editor = $this->getEditor();
11 $until = $object->newUntilDateTime();
17 ->newAbsoluteDateTime()
18 ->setIsAllDay($editor->getOldIsAllDay())
22 public function applyInternalEffects($object, $value) {
23 $actor = $this->getActor();
24 $editor = $this->getEditor();
27 $datetime = PhutilCalendarAbsoluteDateTime
::newFromDictionary($value);
28 $datetime->setIsAllDay($editor->getNewIsAllDay());
29 $object->setUntilDateTime($datetime);
31 $object->setUntilDateTime(null);
35 public function getTitle() {
36 if ($this->getNewValue()) {
38 '%s changed this event to repeat until %s.',
39 $this->renderAuthor(),
40 $this->renderNewDate());
43 '%s changed this event to repeat forever.',
44 $this->renderAuthor());
48 public function getTitleForFeed() {
49 if ($this->getNewValue()) {
51 '%s changed %s to repeat until %s.',
52 $this->renderAuthor(),
53 $this->renderObject(),
54 $this->renderNewDate());
57 '%s changed %s to repeat forever.',
58 $this->renderAuthor(),
59 $this->renderObject());
63 protected function getInvalidDateMessage() {
64 return pht('Repeat until date is invalid.');