ZoneTemplateService
class ZoneTemplateService (View source)
Facade over the zone template use cases, kept so existing callers keep one entry point: ZoneTemplateWriteService (templates and the default flag), ZoneTemplateRecordService (template records) and ZoneTemplateAccessPolicy (who may use or owns a template). Lookups and linked-zone listings read the repository directly. New code should depend on the specific service.
Methods
No description
Get a list of all available zone templates
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Get list of all zones using template
Get id pairs for zones using a template.
Get detailed information about zones using a specific template
No description
Unlink a zone from its template
Get zone details by zone IDs
Check if a zone template exists
Check if zone template name exists
Get zone template IDs by name
Check if another zone template carries this name
Details
__construct(ZoneTemplateRepositoryInterface $repository, ZoneTemplateAccessPolicy $access, ZoneTemplateWriteService $writes, ZoneTemplateRecordService $records)
No description
array
getListZoneTempl(int $userid)
Get a list of all available zone templates
int|null
getDefaultTemplateId()
No description
ZoneTemplateWriteResult
setDefaultTemplate(int $zone_templ_id)
No description
ZoneTemplateWriteResult
unsetDefaultTemplate()
No description
ZoneTemplateWriteResult
addZoneTempl(array $details, int $userid, array $groupIds = [])
No description
ZoneTemplateWriteResult
deleteZoneTempl(int $zone_templ_id)
No description
ZoneTemplateWriteResult
addZoneTemplRecord(int $zone_templ_id, string $name, string $type, string $content, int $ttl, int $prio)
No description
ZoneTemplateWriteResult
editZoneTemplRecord(array $record, int $zone_templ_id)
No description
ZoneTemplateWriteResult
deleteZoneTemplRecord(int $rid, int $zone_templ_id)
No description
bool
canUseTemplate(mixed $zone_templ_id, int $userid, bool $isAdmin)
No description
bool
canCurrentUserUseTemplate(mixed $zone_templ_id)
No description
bool
isUserOwnerOfTemplate(int $zone_templ_id, int $userid)
No description
ZoneTemplateWriteResult
addZoneTemplSaveAs(string $template_name, string $description, int $userid, array $records, array $options, string $domain = '')
No description
array
getListZoneUseTempl(int $zone_templ_id, int $userid)
Get list of all zones using template
array
getZoneAndDomainIdsByTemplate(int $zone_templ_id, int $userid)
Get id pairs for zones using a template.
Returns rows of ['zone_id' => zones.id, 'domain_id' => zones.domain_id] so callers can pass the right value to PowerDNS-side operations (domain_id) and to Poweradmin-native sync tracking (zone_id). On SQL backends the result is inner-joined against the PowerDNS domains table to skip orphaned mappings whose domain_id no longer exists (those would crash later in updateZoneRecords).
array
getZonesUsingTemplate(int $zone_templ_id, int $userid)
Get detailed information about zones using a specific template
ZoneTemplateWriteResult
editZoneTempl(array $details, int $zone_templ_id, int $user_id)
No description
bool
unlinkZoneFromTemplate(int $zone_id)
Unlink a zone from its template
array
getZonesByIds(array $zone_ids)
Get zone details by zone IDs
bool
zoneTemplIdExists(int $zone_templ_id)
Check if a zone template exists
bool
zoneTemplNameExists(string $zone_templ_name)
Check if zone template name exists
array
getZoneTemplIdsByName(string $name)
Get zone template IDs by name
Template names are not unique, so several IDs may come back.
bool
zoneTemplNameAndIdExists(string $zone_templ_name, int $zone_templ_id)
Check if another zone template carries this name