2015-04-28 15:26:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorCalendarEventTransaction
|
2016-07-13 00:44:11 +02:00
|
|
|
extends PhabricatorModularTransaction {
|
2015-05-29 02:27:25 +02:00
|
|
|
|
2015-05-01 22:26:07 +02:00
|
|
|
const MAILTAG_RESCHEDULE = 'calendar-reschedule';
|
2015-04-28 15:26:48 +02:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2016-07-13 00:44:11 +02:00
|
|
|
public function getBaseTransactionClass() {
|
|
|
|
return 'PhabricatorCalendarEventTransactionType';
|
2015-04-28 15:26:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getMailTags() {
|
|
|
|
$tags = array();
|
|
|
|
switch ($this->getTransactionType()) {
|
2016-07-13 00:44:11 +02:00
|
|
|
case PhabricatorCalendarEventNameTransaction::TRANSACTIONTYPE:
|
|
|
|
case PhabricatorCalendarEventDescriptionTransaction::TRANSACTIONTYPE:
|
|
|
|
case PhabricatorCalendarEventInviteTransaction::TRANSACTIONTYPE:
|
2015-04-28 15:26:48 +02:00
|
|
|
$tags[] = self::MAILTAG_CONTENT;
|
|
|
|
break;
|
2016-07-13 00:44:11 +02:00
|
|
|
case PhabricatorCalendarEventStartDateTransaction::TRANSACTIONTYPE:
|
|
|
|
case PhabricatorCalendarEventEndDateTransaction::TRANSACTIONTYPE:
|
|
|
|
case PhabricatorCalendarEventCancelTransaction::TRANSACTIONTYPE:
|
2015-05-01 22:26:07 +02:00
|
|
|
$tags[] = self::MAILTAG_RESCHEDULE;
|
2015-04-29 22:51:09 +02:00
|
|
|
break;
|
2015-04-28 15:26:48 +02:00
|
|
|
}
|
|
|
|
return $tags;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|