Documentation

CreateSubmissionCommentDTO extends AbstractBaseDto implements DTOInterface

Data Transfer Object for creating submission comments in Canvas LMS

This DTO handles the creation of new submission comments with all the necessary fields supported by the Canvas Submission Comments API.

Table of Contents

Interfaces

DTOInterface

Properties

$fileIds  : array<string|int, int>|null
Array of file IDs to attach to the comment
$groupComment  : bool|null
Whether the comment should be visible to all group members (for group assignments)
$mediaCommentId  : string|null
Media comment ID for audio/video comments
$mediaCommentType  : string|null
Media comment type ('audio' or 'video')
$textComment  : string|null
Text content of the comment
$apiPropertyName  : string
The API property name for multipart requests

Methods

__construct()  : mixed
BaseDto constructor.
getFileIds()  : array<string|int, int>|null
Get file IDs
getGroupComment()  : bool|null
Get group comment status
getMediaCommentId()  : string|null
Get media comment ID
getMediaCommentType()  : string|null
Get media comment type
getTextComment()  : string|null
Get text comment
setFileIds()  : void
Set file IDs
setGroupComment()  : void
Set group comment status
setMediaCommentId()  : void
Set media comment ID
setMediaCommentType()  : void
Set media comment type
setTextComment()  : void
Set text comment
toApiArray()  : array<string|int, mixed>
Convert the DTO to an array for API requests
toArray()  : array<string|int, mixed>
Convert the DTO to an array

Properties

$groupComment

Whether the comment should be visible to all group members (for group assignments)

public bool|null $groupComment = null

Methods

__construct()

BaseDto constructor.

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Tags
throws
Exception

getFileIds()

Get file IDs

public getFileIds() : array<string|int, int>|null
Return values
array<string|int, int>|null

getMediaCommentType()

Get media comment type

public getMediaCommentType() : string|null
Return values
string|null

setFileIds()

Set file IDs

public setFileIds(array<string|int, int>|null $fileIds) : void
Parameters
$fileIds : array<string|int, int>|null

setGroupComment()

Set group comment status

public setGroupComment(bool|null $groupComment) : void
Parameters
$groupComment : bool|null

setMediaCommentId()

Set media comment ID

public setMediaCommentId(string|null $mediaCommentId) : void
Parameters
$mediaCommentId : string|null

setMediaCommentType()

Set media comment type

public setMediaCommentType(string|null $mediaCommentType) : void
Parameters
$mediaCommentType : string|null

setTextComment()

Set text comment

public setTextComment(string|null $textComment) : void
Parameters
$textComment : string|null

toApiArray()

Convert the DTO to an array for API requests

public toApiArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

Convert the DTO to an array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results