mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
7b09f5698f
Summary: Ref T9275. Swaps Calendar over to modular transactions. Theoretically, this has almost no effect on anything. Ref T10633. I didn't actually do anything here yet, but this gets us ready to put timestamps in email. Test Plan: Created and edited a bunch of events, nothing seemed catastrophically broken. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9275, T10633 Differential Revision: https://secure.phabricator.com/D16286
43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
|
|
final class PhabricatorCalendarEventTransaction
|
|
extends PhabricatorModularTransaction {
|
|
|
|
const MAILTAG_RESCHEDULE = 'calendar-reschedule';
|
|
const MAILTAG_CONTENT = 'calendar-content';
|
|
const MAILTAG_OTHER = 'calendar-other';
|
|
|
|
public function getApplicationName() {
|
|
return 'calendar';
|
|
}
|
|
|
|
public function getApplicationTransactionType() {
|
|
return PhabricatorCalendarEventPHIDType::TYPECONST;
|
|
}
|
|
|
|
public function getApplicationTransactionCommentObject() {
|
|
return new PhabricatorCalendarEventTransactionComment();
|
|
}
|
|
|
|
public function getBaseTransactionClass() {
|
|
return 'PhabricatorCalendarEventTransactionType';
|
|
}
|
|
|
|
public function getMailTags() {
|
|
$tags = array();
|
|
switch ($this->getTransactionType()) {
|
|
case PhabricatorCalendarEventNameTransaction::TRANSACTIONTYPE:
|
|
case PhabricatorCalendarEventDescriptionTransaction::TRANSACTIONTYPE:
|
|
case PhabricatorCalendarEventInviteTransaction::TRANSACTIONTYPE:
|
|
$tags[] = self::MAILTAG_CONTENT;
|
|
break;
|
|
case PhabricatorCalendarEventStartDateTransaction::TRANSACTIONTYPE:
|
|
case PhabricatorCalendarEventEndDateTransaction::TRANSACTIONTYPE:
|
|
case PhabricatorCalendarEventCancelTransaction::TRANSACTIONTYPE:
|
|
$tags[] = self::MAILTAG_RESCHEDULE;
|
|
break;
|
|
}
|
|
return $tags;
|
|
}
|
|
|
|
}
|