recreate calendar range when an event is deleted

This commit is contained in:
2022-07-01 13:43:30 +02:00
parent 0276ec1bc7
commit 87403e509f
9 changed files with 160 additions and 19 deletions

View File

@@ -136,6 +136,20 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
}
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{
if ('' === $remoteId) {
return;
}
$this->removeEvent($remoteId, $user);
if (null !== $associatedCalendarRange) {
$this->syncCalendarRange($associatedCalendarRange);
}
}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void
{
if ('' === $remoteId) {

View File

@@ -36,6 +36,11 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
return [];
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{
}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void
{
}

View File

@@ -41,6 +41,8 @@ interface RemoteCalendarConnectorInterface
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void;
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void;
/**
* @param array<array{inviteId: int, userId: int, userEmail: int, userLabel: string}> $oldInvites
*/