interface ZoneWriteRepositoryInterface (View source)

Zone row, comment and metadata writes (plus the metadata read the editor pairs with them); one of the three roles ZoneRepositoryInterface combines.

Methods

int|string
createZoneShell(int $domainId, int|null $owner, int $templateId)

Write the native zones row of a zone the backend has just created.

void
deleteZoneShell(int $domainId)

Drop the native zones row of a zone, when the zone is deleted.

void
saveZoneComment(int $zoneId, string $comment)

Set the zone comment, creating the zones row for a zone that has none.

bool
updateZoneComment(int $zoneId, string $comment)

Update zone comment

bool
updateZone(int $zoneId, array $updates)

Update zone metadata

bool
deleteZone(int $zoneId)

Delete a zone by ID

Details

int|string createZoneShell(int $domainId, int|null $owner, int $templateId)

Write the native zones row of a zone the backend has just created.

Parameters

int $domainId

The zone id the backend returned

int|null $owner

Owning user, null for a zone owned by groups only

int $templateId

Zone template the zone was seeded from, 0 for none

Return Value

int|string

The zones.id the template sync rows key on

void deleteZoneShell(int $domainId)

Drop the native zones row of a zone, when the zone is deleted.

Parameters

int $domainId

Return Value

void

void saveZoneComment(int $zoneId, string $comment)

Set the zone comment, creating the zones row for a zone that has none.

Parameters

int $zoneId
string $comment

Return Value

void

bool updateZoneComment(int $zoneId, string $comment)

Update zone comment

Parameters

int $zoneId

The zone ID

string $comment

The new comment

Return Value

bool

True if updated successfully

bool updateZone(int $zoneId, array $updates)

Update zone metadata

Parameters

int $zoneId

The zone ID

array $updates

Array of field => value pairs to update

Return Value

bool

True if zone was updated successfully

bool deleteZone(int $zoneId)

Delete a zone by ID

Parameters

int $zoneId

The zone ID

Return Value

bool

True if zone was deleted successfully