ZoneTemplateSyncService
class ZoneTemplateSyncService (View source)
Service for managing zone template synchronization tracking
Methods
No description
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
Remove sync tracking when zone is unlinked from 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
Get list of zones needing sync for a template
Check if a specific zone needs sync
Initialize sync records for existing zone-template relationships
Details
__construct(PDO $db, ConfigurationInterface $config, DnsBackendProvider|null $backendProvider = null)
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
removeSyncRecord(int $zoneId, int $templateId)
Remove sync tracking when zone is unlinked from 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
array
getUnsyncedZones(int $templateId)
Get list of zones needing sync for a template
bool
zoneNeedsSync(int $zoneId, int $templateId)
Check if a specific zone needs sync
void
initializeSyncRecords()
Initialize sync records for existing zone-template relationships