CreateGroupMembershipDTO
extends AbstractBaseDto
in package
Data Transfer Object for creating a group membership in Canvas LMS.
Table of Contents
Properties
- $invitees : array<string|int, string>|null
- Email addresses to invite to the group
- $moderator : bool|null
- Whether to make the user(s) a moderator
- $userId : int|null
- User ID to add to the group
- $userIds : array<string|int, int>|null
- Array of user IDs to add to the group (for bulk operations)
- $workflowState : string|null
- Workflow state for the membership Values: 'accepted', 'invited', 'requested'
- $apiPropertyName : string
- The name of the property in the API
Methods
- __construct() : mixed
- BaseDto constructor.
- toApiArray() : array<string|int, array{name: string, contents: string}>
- Convert DTO to API-compatible array format
- toArray() : array<string|int, mixed>
- Convert the DTO to an array
Properties
$invitees
Email addresses to invite to the group
public
array<string|int, string>|null
$invitees
= null
$moderator
Whether to make the user(s) a moderator
public
bool|null
$moderator
= null
$userId
User ID to add to the group
public
int|null
$userId
= null
$userIds
Array of user IDs to add to the group (for bulk operations)
public
array<string|int, int>|null
$userIds
= null
$workflowState
Workflow state for the membership Values: 'accepted', 'invited', 'requested'
public
string|null
$workflowState
= null
$apiPropertyName
The name of the property in the API
protected
string
$apiPropertyName
= ''
Methods
__construct()
BaseDto constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
toApiArray()
Convert DTO to API-compatible array format
public
toApiArray() : array<string|int, array{name: string, contents: string}>
Return values
array<string|int, array{name: string, contents: string}>toArray()
Convert the DTO to an array
public
toArray() : array<string|int, mixed>