mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
49448a87c1
Summary: Ref T10747. Rough flow is: - Run a query. - Select a new "Export Events..." action. - This lets you define an "Export", which has a unique URL you can paste into Google Calendar or Calendar.app or whatever. Most of this does nothing yet but here's the boilerplate. Test Plan: Doesn't do anything yet. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10747 Differential Revision: https://secure.phabricator.com/D16675
28 lines
628 B
PHP
28 lines
628 B
PHP
<?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());
|
|
}
|
|
}
|
|
|
|
}
|