Path: blob/master/src/applications/calendar/xaction/PhabricatorCalendarEventEndDateTransaction.php
12256 views
<?php12final class PhabricatorCalendarEventEndDateTransaction3extends PhabricatorCalendarEventDateTransaction {45const TRANSACTIONTYPE = 'calendar.enddate';67public function generateOldValue($object) {8$editor = $this->getEditor();910return $object->newEndDateTimeForEdit()11->newAbsoluteDateTime()12->setIsAllDay($editor->getOldIsAllDay())13->toDictionary();14}1516public function applyInternalEffects($object, $value) {17$actor = $this->getActor();18$editor = $this->getEditor();1920$datetime = PhutilCalendarAbsoluteDateTime::newFromDictionary($value);21$datetime->setIsAllDay($editor->getNewIsAllDay());2223$object->setEndDateTime($datetime);24}2526public function shouldHide() {27if ($this->isCreateTransaction()) {28return true;29}3031return false;32}3334public function getTitle() {35return pht(36'%s changed the end date for this event from %s to %s.',37$this->renderAuthor(),38$this->renderOldDate(),39$this->renderNewDate());40}4142public function getTitleForFeed() {43return pht(44'%s changed the end date for %s from %s to %s.',45$this->renderAuthor(),46$this->renderObject(),47$this->renderOldDate(),48$this->renderNewDate());49}5051protected function getInvalidDateMessage() {52return pht('End date is invalid.');53}5455}565758