Documentation

UpdateBookmarkDTO extends AbstractBaseDto
in package
implements DTOInterface

Data Transfer Object for updating Canvas bookmarks

This DTO handles the transformation of bookmark update data into the format expected by the Canvas API. All fields are optional to support partial updates.

Table of Contents

Interfaces

DTOInterface

Properties

$data  : string|null
Additional metadata about the bookmarked item (JSON string)
$name  : string|null
The name/label of the bookmark
$position  : int|null
Position for ordering bookmarks
$url  : string|null
The URL being bookmarked
$apiPropertyName  : string
The API property name for multipart format

Methods

__construct()  : mixed
BaseDto constructor.
fromArray()  : self
Create DTO from array
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

$data

Additional metadata about the bookmarked item (JSON string)

public string|null $data = null

$apiPropertyName

The API property name for multipart format

protected string $apiPropertyName = 'bookmark'

Methods

__construct()

BaseDto constructor.

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

fromArray()

Create DTO from array

public static fromArray(array<string, mixed> $data) : self
Parameters
$data : array<string, mixed>
Return values
self

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