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/PhabricatorCalendarImportReloadTransaction.php
epriestley f4a3887b6b Add an explicit "Reload Import" action to imports
Summary: Ref T10747. This makes development/debugging/testing easier and moves us closer to triggered imports (e.g., keep in sync with Google once per day).

Test Plan:
  - Reloaded an event import.
  - Edited an event in Google Calendar, reloaded, got updated event.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16747
2016-10-25 10:33:14 -07:00

23 lines
543 B
PHP

<?php
final class PhabricatorCalendarImportReloadTransaction
extends PhabricatorCalendarImportTransactionType {
const TRANSACTIONTYPE = 'calendar.import.reload';
public function generateOldValue($object) {
return false;
}
public function applyExternalEffects($object, $value) {
// NOTE: This transaction does nothing directly; instead, the Editor
// reacts to it and performs the reload.
}
public function getTitle() {
return pht(
'%s reloaded this event source.',
$this->renderAuthor());
}
}