CreateSubmissionCommentDTO
extends AbstractBaseDto
in package
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
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
$fileIds
Array of file IDs to attach to the comment
public
array<string|int, int>|null
$fileIds
= null
$groupComment
Whether the comment should be visible to all group members (for group assignments)
public
bool|null
$groupComment
= null
$mediaCommentId
Media comment ID for audio/video comments
public
string|null
$mediaCommentId
= null
$mediaCommentType
Media comment type ('audio' or 'video')
public
string|null
$mediaCommentType
= null
$textComment
Text content of the comment
public
string|null
$textComment
= null
$apiPropertyName
The API property name for multipart requests
protected
string
$apiPropertyName
= 'comment'
Methods
__construct()
BaseDto constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
getFileIds()
Get file IDs
public
getFileIds() : array<string|int, int>|null
Return values
array<string|int, int>|nullgetGroupComment()
Get group comment status
public
getGroupComment() : bool|null
Return values
bool|nullgetMediaCommentId()
Get media comment ID
public
getMediaCommentId() : string|null
Return values
string|nullgetMediaCommentType()
Get media comment type
public
getMediaCommentType() : string|null
Return values
string|nullgetTextComment()
Get text comment
public
getTextComment() : string|null
Return values
string|nullsetFileIds()
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>