class RecordManagerService (View source)

Creates a record through RecordManager, then logs it, stores its comment and syncs the PTR comment.

Methods

__construct(DomainRepositoryInterface $domainRepository, RecordRepositoryInterface $recordRepository, RecordManagerInterface $recordManager, RecordCommentService $recordCommentService, AuditService $audit, ConfigurationInterface $config, PermissionService $permissions, ChangeApprovalContext|null $approval = null)

No description

createRecord(int $zone_id, string $name, string $type, string $content, int $ttl, int $prio, string $comment, string $userlogin, int $disabled = 0, string $origin = AuditLoggerInterface::ORIGIN_WEB, int|null $userId = null, bool $finalizeZone = true, Closure|null $syncZoneAllowed = null)

Creates the record and, on success, logs, rectifies and stores the comment.

void
syncCompanionComment(int $zoneId, string $name, string $type, string $content, string $comment, string $userLogin, int $userId, Closure|null $zoneAllowed = null)

Copy a new record's comment to the companion A or PTR record created right after it.

Details

__construct(DomainRepositoryInterface $domainRepository, RecordRepositoryInterface $recordRepository, RecordManagerInterface $recordManager, RecordCommentService $recordCommentService, AuditService $audit, ConfigurationInterface $config, PermissionService $permissions, ChangeApprovalContext|null $approval = null)

No description

Parameters

DomainRepositoryInterface $domainRepository
RecordRepositoryInterface $recordRepository
RecordManagerInterface $recordManager
RecordCommentService $recordCommentService
AuditService $audit
ConfigurationInterface $config
PermissionService $permissions
ChangeApprovalContext|null $approval

RecordWriteResult createRecord(int $zone_id, string $name, string $type, string $content, int $ttl, int $prio, string $comment, string $userlogin, int $disabled = 0, string $origin = AuditLoggerInterface::ORIGIN_WEB, int|null $userId = null, bool $finalizeZone = true, Closure|null $syncZoneAllowed = null)

Creates the record and, on success, logs, rectifies and stores the comment.

Failures come back as the result; nothing is written to MessageService.

Parameters

int $zone_id
string $name
string $type
string $content
int $ttl
int $prio
string $comment
string $userlogin
int $disabled
string $origin

One of the AuditLoggerInterface::ORIGIN_* values; picks the audit event

int|null $userId

The acting user; the comment reaches a related A/PTR record only in a zone this user may edit, and never when null

bool $finalizeZone

Bump the serial and rectify; a batch caller does that once itself

Closure|null $syncZoneAllowed

Whether the synced comment may reach the related zone (an API key's zone scope)

Return Value

RecordWriteResult

void syncCompanionComment(int $zoneId, string $name, string $type, string $content, string $comment, string $userLogin, int $userId, Closure|null $zoneAllowed = null)

Copy a new record's comment to the companion A or PTR record created right after it.

createRecord() syncs before the companion exists, so the add flow calls this once it does.

Parameters

int $zoneId
string $name
string $type
string $content
string $comment
string $userLogin
int $userId
Closure|null $zoneAllowed

Whether the comment may reach the companion's zone (an API key's zone scope)

Return Value

void