RecordAddService
class RecordAddService (View source)
The add-record flow shared by the add-record page, the inline form on the zone editor and the record wizards: open() applies the same gates in the same order, and add() normalises name, content and TTL the same way and follows the same rules for the companion PTR or A record.
Methods
No description
Whether the user may add records to the zone directly: the user must have some edit or request access to it, the zone must exist, the user's changes must not be routed through review (those go through the zone editor), and the zone must be writable by them.
No description
add() for the web forms, where an IP address typed as the name in a reverse zone stands for its PTR name and one outside the zone is refused.
Details
__construct(RecordManagerService $records, ReverseRecordCreator $reverseRecords, DomainRecordCreator $domainRecords, ReverseTtlResolver $ttlResolver, PermissionService $permissions, DomainRepositoryInterface $domains, ChangeApprovalContext $approval)
No description
RecordAddAccess
open(int $zoneId, int $userId)
Whether the user may add records to the zone directly: the user must have some edit or request access to it, the zone must exist, the user's changes must not be routed through review (those go through the zone editor), and the zone must be writable by them.
RecordAddResult
add(int $zoneId, string $zoneName, string $name, string $type, string $content, int|null $ttl, int $prio, string $comment, int $userId, string $username, string $companion = '', int $disabled = 0, string $origin = AuditLoggerInterface::ORIGIN_WEB, Closure|null $companionZoneAllowed = null)
No description
RecordAddResult
addFromForm(int $zoneId, string $zoneName, string $name, string $type, string $content, int|null $ttl, int $prio, string $comment, int $userId, string $username, string $companion = '')
add() for the web forms, where an IP address typed as the name in a reverse zone stands for its PTR name and one outside the zone is refused.