3 final class PhabricatorCalendarEventStartDateTransaction
4 extends PhabricatorCalendarEventDateTransaction
{
6 const TRANSACTIONTYPE
= 'calendar.startdate';
8 public function generateOldValue($object) {
9 $editor = $this->getEditor();
11 return $object->newStartDateTime()
12 ->newAbsoluteDateTime()
13 ->setIsAllDay($editor->getOldIsAllDay())
17 public function applyInternalEffects($object, $value) {
18 $actor = $this->getActor();
19 $editor = $this->getEditor();
21 $datetime = PhutilCalendarAbsoluteDateTime
::newFromDictionary($value);
22 $datetime->setIsAllDay($editor->getNewIsAllDay());
24 $object->setStartDateTime($datetime);
27 public function shouldHide() {
28 if ($this->isCreateTransaction()) {
35 public function getTitle() {
37 '%s changed the start date for this event from %s to %s.',
38 $this->renderAuthor(),
39 $this->renderOldDate(),
40 $this->renderNewDate());
43 public function getTitleForFeed() {
45 '%s changed the start date for %s from %s to %s.',
46 $this->renderAuthor(),
47 $this->renderObject(),
48 $this->renderOldDate(),
49 $this->renderNewDate());
52 protected function getInvalidDateMessage() {
53 return pht('Start date is invalid.');