3 final class PhabricatorCalendarEventRecurringTransaction
4 extends PhabricatorCalendarEventTransactionType
{
6 const TRANSACTIONTYPE
= 'calendar.recurring';
8 public function generateOldValue($object) {
9 return (int)$object->getIsRecurring();
12 public function generateNewValue($object, $value) {
16 public function isInheritedEdit() {
20 public function shouldHide() {
21 // This event isn't interesting on its own, and is accompanied by an
22 // "alice set this event to repeat weekly." event in normal circumstances
27 public function applyInternalEffects($object, $value) {
28 $object->setIsRecurring($value);
31 public function validateTransactions($object, array $xactions) {
34 $old = $object->getIsRecurring();
35 foreach ($xactions as $xaction) {
36 if ($this->isNewObject()) {
40 if ($xaction->getNewValue() == $old) {
44 if ($xaction->getNewValue()) {
48 $errors[] = $this->newInvalidError(
50 'An event can not be stopped from recurring once it has been '.
51 'made recurring. You can cancel the event.'),