Documentation

UpdatePageDTO extends AbstractBaseDto
in package
implements DTOInterface

Data Transfer Object for updating pages in Canvas LMS

This DTO handles the updating of existing pages with all the necessary fields supported by the Canvas API. All fields are nullable to support partial updates.

Table of Contents

Interfaces

DTOInterface

Properties

$body  : string|null
Page body content (HTML)
$editingRoles  : string|null
Who can edit the page (teachers, students, members, public)
$frontPage  : bool|null
Whether this page is the front page for the course
$notifyOfUpdate  : bool|null
Whether to notify users of the page update
$publishAt  : string|null
Scheduled publication date
$published  : bool|null
Whether the page is published
$title  : string|null
Page title
$apiPropertyName  : string
The API property name for multipart requests

Methods

__construct()  : mixed
BaseDto constructor.
getBody()  : string|null
Get page body
getEditingRoles()  : string|null
Get editing roles
getFrontPage()  : bool|null
Get front page status
getNotifyOfUpdate()  : bool|null
Get notify of update status
getPublishAt()  : string|null
Get publish at date
getPublished()  : bool|null
Get published status
getTitle()  : string|null
Get page title
setBody()  : void
Set page body
setEditingRoles()  : void
Set editing roles
setFrontPage()  : void
Set front page status
setNotifyOfUpdate()  : void
Set notify of update status
setPublishAt()  : void
Set publish at date
setPublished()  : void
Set published status
setTitle()  : void
Set page title
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

$body

Page body content (HTML)

public string|null $body = null

$editingRoles

Who can edit the page (teachers, students, members, public)

public string|null $editingRoles = null

$frontPage

Whether this page is the front page for the course

public bool|null $frontPage = null

$notifyOfUpdate

Whether to notify users of the page update

public bool|null $notifyOfUpdate = null

$publishAt

Scheduled publication date

public string|null $publishAt = null

$published

Whether the page is published

public bool|null $published = null

$apiPropertyName

The API property name for multipart requests

protected string $apiPropertyName = 'wiki_page'

Methods

__construct()

BaseDto constructor.

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

getBody()

Get page body

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

getEditingRoles()

Get editing roles

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

getFrontPage()

Get front page status

public getFrontPage() : bool|null
Return values
bool|null

getNotifyOfUpdate()

Get notify of update status

public getNotifyOfUpdate() : bool|null
Return values
bool|null

getPublishAt()

Get publish at date

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

getPublished()

Get published status

public getPublished() : bool|null
Return values
bool|null

getTitle()

Get page title

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

setBody()

Set page body

public setBody(string|null $body) : void
Parameters
$body : string|null

setEditingRoles()

Set editing roles

public setEditingRoles(string|null $editingRoles) : void
Parameters
$editingRoles : string|null

setFrontPage()

Set front page status

public setFrontPage(bool|null $frontPage) : void
Parameters
$frontPage : bool|null

setNotifyOfUpdate()

Set notify of update status

public setNotifyOfUpdate(bool|null $notifyOfUpdate) : void
Parameters
$notifyOfUpdate : bool|null

setPublishAt()

Set publish at date

public setPublishAt(string|null $publishAt) : void
Parameters
$publishAt : string|null

setPublished()

Set published status

public setPublished(bool|null $published) : void
Parameters
$published : bool|null

setTitle()

Set page title

public setTitle(string|null $title) : void
Parameters
$title : 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