Page MenuHomec4science

PhabricatorCalendarEventDateTransaction.php
No OneTemporary

File Metadata

Created
Fri, Sep 13, 02:19

PhabricatorCalendarEventDateTransaction.php

<?php
abstract class PhabricatorCalendarEventDateTransaction
extends PhabricatorCalendarEventTransactionType {
abstract protected function getInvalidDateMessage();
public function generateNewValue($object, $value) {
$editor = $this->getEditor();
return $value->newPhutilDateTime()
->setIsAllDay($editor->getNewIsAllDay())
->newAbsoluteDateTime()
->toDictionary();
}
public function validateTransactions($object, array $xactions) {
$errors = array();
foreach ($xactions as $xaction) {
if ($xaction->getNewValue()->isValid()) {
continue;
}
$message = $this->getInvalidDateMessage();
$errors[] = $this->newInvalidError($message, $xaction);
}
return $errors;
}
}

Event Timeline