RecordCommentService
class RecordCommentService implements RecordCommentEditorInterface (View source)
Reads and writes the comment attached to a record.
On the SQL backend comments are stored per record through a linking table (record_comment_links), so records sharing a name and type can carry different comments. The API backend has no such table: it keeps one comment per RRset and the per-record operations report that they are unsupported.
Methods
No description
Whether this backend can attach a comment to one record rather than its whole RRset
Create a comment for a specific record.
Create a comment for an RRset (legacy method).
Delete all comments for an RRset.
Delete legacy RRset comments that have no per-record links.
Delete comment for a specific record.
Delete all comments for a domain.
Update a comment for a specific record.
Update a comment for an RRset when name/type changes (legacy method).
Find a comment for an RRset.
Find a comment for a specific record.
Details
__construct(RecordCommentRepositoryInterface $recordCommentRepository, RecordLinkedCommentRepositoryInterface|null $linkedComments = null)
No description
bool
supportsPerRecordComments()
Whether this backend can attach a comment to one record rather than its whole RRset
RecordComment|null
createCommentForRecord(int $domainId, string $name, string $type, string $comment, int|string $recordId, string|null $account = null)
Create a comment for a specific record.
Uses the linking table for per-record comment storage.
RecordComment|null
createComment(int $domainId, string $name, string $type, string $comment, string|null $account = null)
Create a comment for an RRset (legacy method).
This does NOT use the linking table - use createCommentForRecord() for per-record comments.
bool
deleteComment(int $domainId, string $name, string $type)
Delete all comments for an RRset.
Also removes any links pointing to those comments.
bool
deleteLegacyComment(int $domainId, string $name, string $type)
Delete legacy RRset comments that have no per-record links.
bool
deleteCommentByRecordId(int|string $recordId)
Delete comment for a specific record.
Removes the link and the associated comment.
void
deleteCommentsByDomainId(int $domainId)
Delete all comments for a domain.
RecordComment|null
updateCommentForRecord(int $domainId, string $name, string $type, string $comment, int|string $recordId, string|null $account = null)
Update a comment for a specific record.
Uses the linking table for per-record comment storage.
RecordComment|null
updateComment(int $domainId, string $oldName, string $oldType, string $newName, string $newType, string $comment, string|null $account = null)
Update a comment for an RRset when name/type changes (legacy method).
RecordComment|null
findComment(int $domainId, string $name, string $type)
Find a comment for an RRset.
RecordComment|null
findCommentByRecordId(int|string $recordId)
Find a comment for a specific record.