1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00
phorge-phorge/src/applications/calendar/xaction/PhabricatorCalendarExportDisableTransaction.php

29 lines
628 B
PHP
Raw Normal View History

<?php
final class PhabricatorCalendarExportDisableTransaction
extends PhabricatorCalendarExportTransactionType {
const TRANSACTIONTYPE = 'calendar.export.disable';
public function generateOldValue($object) {
return (int)$object->getIsDisabled();
}
public function applyInternalEffects($object, $value) {
$object->setIsDisabled((int)$value);
}
public function getTitle() {
if ($this->getNewValue()) {
return pht(
'%s disabled this export.',
$this->renderAuthor());
} else {
return pht(
'%s enabled this export.',
$this->renderAuthor());
}
}
}