interface ZoneTemplateSyncRepositoryInterface (View source)

Tracks which zones are out of date against their template after the template changes.

Methods

void
markTemplateAsModified(int $templateId)

Mark all zones using a template as needing sync

void
markZoneAsSynced(int $zoneId, int $templateId)

Mark a specific zone as synced with its template

void
markZonesAsSynced(array $zoneIds, int $templateId)

Mark multiple zones as synced

void
createSyncRecord(int $zoneId, int $templateId)

Create sync tracking record when zone is linked to template

void
removeStaleSyncRecords(int $zoneId, int $keepTemplateId)

Drop sync rows for prior templates so the table reflects the zone's current template.

void
cleanupZoneSyncRecords(int $zoneId)

Remove all sync tracking records for a zone when it's deleted

int
getUnsyncedZoneCount(int $templateId)

Get count of zones needing sync for a template

array
getTemplateSyncStatus(int|null $userId = null)

Get sync status for all templates

Details

void markTemplateAsModified(int $templateId)

Mark all zones using a template as needing sync

Parameters

int $templateId

Return Value

void

void markZoneAsSynced(int $zoneId, int $templateId)

Mark a specific zone as synced with its template

Parameters

int $zoneId
int $templateId

Return Value

void

void markZonesAsSynced(array $zoneIds, int $templateId)

Mark multiple zones as synced

Parameters

array $zoneIds
int $templateId

Return Value

void

void createSyncRecord(int $zoneId, int $templateId)

Create sync tracking record when zone is linked to template

Parameters

int $zoneId
int $templateId

Return Value

void

void removeStaleSyncRecords(int $zoneId, int $keepTemplateId)

Drop sync rows for prior templates so the table reflects the zone's current template.

Pass 0 as $keepTemplateId to clear every sync row for the zone.

Parameters

int $zoneId
int $keepTemplateId

Return Value

void

void cleanupZoneSyncRecords(int $zoneId)

Remove all sync tracking records for a zone when it's deleted

Parameters

int $zoneId

Return Value

void

int getUnsyncedZoneCount(int $templateId)

Get count of zones needing sync for a template

Parameters

int $templateId

Return Value

int

array getTemplateSyncStatus(int|null $userId = null)

Get sync status for all templates

Parameters

int|null $userId

Return Value

array