interface RecordLinkedCommentRepositoryInterface (View source)

Comments linked to individual records through record_comment_links.

Only the SQL backend has the linking table; the API backend keeps one comment per RRset and offers no implementation of this port.

Methods

findByRecordId(int|string $recordId)

Find the comment linked to a record.

bool
deleteByRecordId(int|string $recordId)

Delete the comment linked to a record, and the link.

bool
linkRecordToComment(int|string $recordId, int $commentId)

Link a record to a comment.

bool
unlinkRecord(int|string $recordId)

Unlink a record from its comment.

bool
migrateLegacyComments(int $domainId, string $name, string $type, int|string $excludeRecordId)

Copy a legacy RRset comment to per-record links for every record of the RRset that has none yet, except the given one.

Details

RecordComment|null findByRecordId(int|string $recordId)

Find the comment linked to a record.

Parameters

int|string $recordId

The record ID

Return Value

RecordComment|null

bool deleteByRecordId(int|string $recordId)

Delete the comment linked to a record, and the link.

Parameters

int|string $recordId

The record ID

Return Value

bool

bool linkRecordToComment(int|string $recordId, int $commentId)

Link a record to a comment.

Parameters

int|string $recordId

The record ID

int $commentId

The comment ID

Return Value

bool

bool unlinkRecord(int|string $recordId)

Unlink a record from its comment.

Parameters

int|string $recordId

The record ID

Return Value

bool

bool migrateLegacyComments(int $domainId, string $name, string $type, int|string $excludeRecordId)

Copy a legacy RRset comment to per-record links for every record of the RRset that has none yet, except the given one.

Parameters

int $domainId

Domain ID

string $name

Record name

string $type

Record type

int|string $excludeRecordId

Record ID to leave alone

Return Value

bool

True if siblings were actually migrated, false if skipped