class RecordAddService (View source)

The add-record flow shared by the add-record page and the inline form on the zone editor: name and content are normalised the same way, the TTL default is resolved the same way, and the companion PTR or A record follows the same rules.

Methods

__construct(RecordManagerService $records, ReverseRecordCreator $reverseRecords, DomainRecordCreator $domainRecords, ReverseTtlResolver $ttlResolver)

No description

add(int $zoneId, string $zoneName, string $name, string $type, string $content, int|null $ttl, int $prio, string $comment, string $username, string $companion = '')

No description

Details

__construct(RecordManagerService $records, ReverseRecordCreator $reverseRecords, DomainRecordCreator $domainRecords, ReverseTtlResolver $ttlResolver)

No description

Parameters

RecordManagerService $records
ReverseRecordCreator $reverseRecords
DomainRecordCreator $domainRecords
ReverseTtlResolver $ttlResolver

RecordAddResult add(int $zoneId, string $zoneName, string $name, string $type, string $content, int|null $ttl, int $prio, string $comment, string $username, string $companion = '')

No description

Parameters

int $zoneId
string $zoneName
string $name
string $type
string $content
int|null $ttl

The submitted TTL, or null for the configured default of the type

int $prio
string $comment
string $username
string $companion

One of the RecordAddResult::COMPANION_* constants, or '' for none

Return Value

RecordAddResult