DbZoneTemplateRepository
class DbZoneTemplateRepository (View source)
Methods
List zone templates visible to the given user
Get zone template details by ID
Get all records for a zone template
Get a single zone template record by ID
Count records in a zone template
Create a new zone template with a default SOA record
Update a zone template
Delete a zone template and all related records
Deletes every template the user owns, with its records and zone links.
Add a record to a zone template
Update a zone template record
Delete a zone template record
Check if a zone template exists
Check if a zone template name already exists
Check if user is the owner of a zone template
Get the owner ID of a zone template
Details
__construct(object $db, ConfigurationInterface $config)
No description
array
listZoneTemplates(int|null $userId, bool $isUeberuser)
List zone templates visible to the given user
array|false
getZoneTemplateDetails(int $id)
Get zone template details by ID
array
getZoneTemplateRecords(int $templateId)
Get all records for a zone template
array
getZoneTemplateRecordById(int $id)
Get a single zone template record by ID
int
countZoneTemplateRecords(int $templateId)
Count records in a zone template
int
createZoneTemplate(string $name, string $description, int $owner, int $createdBy)
Create a new zone template with a default SOA record
bool
updateZoneTemplate(int $id, string $name, string $description, int|null $owner = null)
Update a zone template
bool
deleteZoneTemplate(int $id)
Delete a zone template and all related records
void
deleteZoneTemplatesOwnedBy(int $ownerId)
Deletes every template the user owns, with its records and zone links.
Runs inside the caller's transaction (used by user deletion).
int
addRecord(int $templateId, string $name, string $type, string $content, int $ttl, int $prio)
Add a record to a zone template
bool
updateRecord(int $id, string $name, string $type, string $content, int $ttl, int $prio)
Update a zone template record
bool
deleteRecord(int $id)
Delete a zone template record
bool
zoneTemplateExists(int $id)
Check if a zone template exists
bool
zoneTemplateNameExists(string $name, int|null $excludeId = null)
Check if a zone template name already exists
bool
isOwner(int $templateId, int $userId)
Check if user is the owner of a zone template
int|null
getOwner(int $templateId)
Get the owner ID of a zone template