DbZoneTemplateSyncRepository
final class DbZoneTemplateSyncRepository implements ZoneTemplateSyncRepositoryInterface (View source)
Tracks which zones are out of date against their template in the zone_template_sync table.
Methods
Mark all zones using a template as needing sync
Mark a specific zone as synced with its template
Mark multiple zones as synced
Create sync tracking record when zone is linked to template
Drop sync rows for prior templates so the table reflects the zone's current template.
Remove all sync tracking records for a zone when it's deleted
Get count of zones needing sync for a template
Get sync status for all templates
Details
__construct(PDO $db, ConfigurationInterface $config)
No description
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.
Pass 0 as $keepTemplateId to clear every sync row for the zone.
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