CreateSectionDTO
extends AbstractBaseDto
in package
implements
DTOInterface
Data Transfer Object for creating Canvas sections.
Tags
Table of Contents
Interfaces
Properties
- $enableSisReactivation : bool|null
- When true, will first try to re-activate a deleted section with matching sis_section_id.
- $endAt : DateTime|null
- Section end date in ISO8601 format.
- $integrationId : string|null
- The integration_id of the section.
- $name : string
- The name of the section (required).
- $restrictEnrollmentsToSectionDates : bool|null
- Set to true to restrict user enrollments to the start and end dates of the section.
- $sisSectionId : string|null
- The SIS ID of the section.
- $startAt : DateTime|null
- Section start date in ISO8601 format.
- $apiPropertyName : string
- The name of the property in the API
Methods
- __construct() : mixed
- BaseDto constructor.
- toApiArray() : array<int, array<string, mixed>>
- Convert DTO to API array format.
- toArray() : array<string|int, mixed>
- Convert the DTO to an array
- validate() : void
- Validate the DTO data.
Properties
$enableSisReactivation
When true, will first try to re-activate a deleted section with matching sis_section_id.
public
bool|null
$enableSisReactivation
= null
This parameter is NOT part of the course_section wrapper.
$endAt
Section end date in ISO8601 format.
public
DateTime|null
$endAt
= null
Example: 2011-01-01T01:00Z
$integrationId
The integration_id of the section.
public
string|null
$integrationId
= null
Requires manage_sis permission to set.
$name
The name of the section (required).
public
string
$name
= ''
$restrictEnrollmentsToSectionDates
Set to true to restrict user enrollments to the start and end dates of the section.
public
bool|null
$restrictEnrollmentsToSectionDates
= null
$sisSectionId
The SIS ID of the section.
public
string|null
$sisSectionId
= null
Requires manage_sis permission to set.
$startAt
Section start date in ISO8601 format.
public
DateTime|null
$startAt
= null
Example: 2011-01-01T01:00Z
$apiPropertyName
The name of the property in the API
protected
string
$apiPropertyName
= 'course_section'
Methods
__construct()
BaseDto constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
toApiArray()
Convert DTO to API array format.
public
toApiArray() : array<int, array<string, mixed>>
Handles the special enable_sis_reactivation parameter separately.
Return values
array<int, array<string, mixed>>toArray()
Convert the DTO to an array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>validate()
Validate the DTO data.
public
validate() : void