Documentation

UpdateContentMigrationDTO extends AbstractBaseDto implements DTOInterface

Data Transfer Object for updating content migrations in Canvas LMS

This DTO handles updating content migrations, primarily used for:

  • Providing new pre_attachment values if file upload had issues
  • Updating selective import copy parameters
  • Modifying settings (though most won't take effect after migration starts)

Table of Contents

Interfaces

DTOInterface

Properties

$copy  : array<string, mixed>|null
Copy parameters for selective import Format: copy[resource_type][resource_id] = 1
$dateShiftOptions  : array<string, mixed>|null
Date shift options (if updating)
$preAttachment  : array<string, mixed>|null
Pre-attachment array for file uploads (if retrying upload)
$settings  : array<string, mixed>|null
Migration settings (limited effect after migration starts)
$apiPropertyName  : string
The API property name for multipart requests

Methods

__construct()  : mixed
Constructor
addCopyItems()  : void
Add items to copy for selective import
getCopy()  : array<string, mixed>|null
getDateShiftOptions()  : array<string, mixed>|null
getPreAttachment()  : array<string, mixed>|null
getSettings()  : array<string, mixed>|null
retryFileUpload()  : void
Set file upload retry parameters
setCopy()  : void
setCopyAll()  : void
Set all items of a type to be copied
setCopyProperty()  : void
Set copy parameter using property string from selective data
setDateShiftOptions()  : void
setPreAttachment()  : void
setSettings()  : void
toApiArray()  : array<int, array<string, mixed>>
Transform the DTO to the API-expected array format
toArray()  : array<string|int, mixed>
Convert the DTO to an array
validate()  : bool
Validate the DTO
processCopyParameters()  : void
Process copy parameters recursively

Properties

$copy

Copy parameters for selective import Format: copy[resource_type][resource_id] = 1

public array<string, mixed>|null $copy = null

$dateShiftOptions

Date shift options (if updating)

public array<string, mixed>|null $dateShiftOptions = null

$preAttachment

Pre-attachment array for file uploads (if retrying upload)

public array<string, mixed>|null $preAttachment = null

$settings

Migration settings (limited effect after migration starts)

public array<string, mixed>|null $settings = null

Methods

__construct()

Constructor

public __construct([array<string, mixed> $data = [] ]) : mixed
Parameters
$data : array<string, mixed> = []

addCopyItems()

Add items to copy for selective import

public addCopyItems(string $resourceType, array<string|int, string|int> $resourceIds) : void
Parameters
$resourceType : string

Resource type (e.g., 'assignments', 'quizzes')

$resourceIds : array<string|int, string|int>

Array of resource IDs to copy

getDateShiftOptions()

public getDateShiftOptions() : array<string, mixed>|null
Return values
array<string, mixed>|null

getPreAttachment()

public getPreAttachment() : array<string, mixed>|null
Return values
array<string, mixed>|null

retryFileUpload()

Set file upload retry parameters

public retryFileUpload(string $fileName, int $fileSize[, string|null $contentType = null ]) : void
Parameters
$fileName : string
$fileSize : int
$contentType : string|null = null

setCopy()

public setCopy(array<string, mixed>|null $copy) : void
Parameters
$copy : array<string, mixed>|null

setCopyAll()

Set all items of a type to be copied

public setCopyAll(string $property) : void
Parameters
$property : string

Property for all items (e.g., 'copy[all_assignments]')

setCopyProperty()

Set copy parameter using property string from selective data

public setCopyProperty(string $property[, bool $include = true ]) : void
Parameters
$property : string

Property string (e.g., 'copy[assignments][id_i2102a7fa93b29226774949298626719d]')

$include : bool = true

Whether to include this item

setDateShiftOptions()

public setDateShiftOptions(array<string, mixed>|null $dateShiftOptions) : void
Parameters
$dateShiftOptions : array<string, mixed>|null

setPreAttachment()

public setPreAttachment(array<string, mixed>|null $preAttachment) : void
Parameters
$preAttachment : array<string, mixed>|null

setSettings()

public setSettings(array<string, mixed>|null $settings) : void
Parameters
$settings : array<string, mixed>|null

toApiArray()

Transform the DTO to the API-expected array format

public toApiArray() : array<int, array<string, mixed>>
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>

processCopyParameters()

Process copy parameters recursively

private processCopyParameters(array<string, mixed> $data, array<int, array<string, mixed>> &$result, string $prefix) : void
Parameters
$data : array<string, mixed>
$result : array<int, array<string, mixed>>
$prefix : string

        
On this page

Search results