calendar range: update on remote after an unpdate

This commit is contained in:
2022-05-11 14:20:41 +02:00
parent c892f7de7b
commit dd13e631ac
3 changed files with 82 additions and 14 deletions

View File

@@ -15,6 +15,14 @@ use Doctrine\ORM\Mapping as ORM;
trait RemoteCalendarTrait
{
/**
* If true, the changes won't be enqueued to remote.
*
* This is required to prevent update loop: a persist trigger an event creation on remote,
* which in turn change remoteId and, in turn, trigger an update change, ...
*/
public bool $preventEnqueueChanges = false;
/**
* @ORM\Column(type="json", options={"default": "[]"}, nullable=false)
*/
@@ -25,14 +33,6 @@ trait RemoteCalendarTrait
*/
private string $remoteId = '';
/**
* If true, the changes won't be enqueued to remote
*
* This is required to prevent update loop: a persist trigger an event creation on remote,
* which in turn change remoteId and, in turn, trigger an update change, ...
*/
public bool $preventEnqueueChanges = false;
public function addRemoteAttributes(array $remoteAttributes): self
{
$this->remoteAttributes = array_merge($this->remoteAttributes, $remoteAttributes);