PageRevision
in package
PageRevision Object
Represents a revision of a Canvas Page. Each revision captures the state of a page at a specific point in time, including who edited it and when.
Table of Contents
Properties
- $body : string|null
- The historic page contents
- $editedBy : array<string, mixed>|null
- The User who saved this revision
- $latest : bool|null
- Whether this is the latest revision or not
- $revisionId : int|null
- An identifier for this revision of the page
- $title : string|null
- The historic page title
- $updatedAt : string|null
- The time when this revision was saved
- $url : string|null
- The historic URL of the page
Methods
- __construct() : mixed
- Constructor
- getBody() : string|null
- Get body
- getEditedBy() : array<string, mixed>|null
- Get edited by user
- getLatest() : bool|null
- Get latest status
- getRevisionId() : int|null
- Get revision ID
- getTitle() : string|null
- Get title
- getUpdatedAt() : string|null
- Get updated at timestamp
- getUrl() : string|null
- Get URL
- isLatest() : bool
- Check if this is the latest revision
- setBody() : void
- Set body
- setEditedBy() : void
- Set edited by user
- setLatest() : void
- Set latest status
- setRevisionId() : void
- Set revision ID
- setTitle() : void
- Set title
- setUpdatedAt() : void
- Set updated at timestamp
- setUrl() : void
- Set URL
- toArray() : array<string, mixed>
- Convert to array
Properties
$body
The historic page contents
public
string|null
$body
= null
$editedBy
The User who saved this revision
public
array<string, mixed>|null
$editedBy
= null
$latest
Whether this is the latest revision or not
public
bool|null
$latest
= null
$revisionId
An identifier for this revision of the page
public
int|null
$revisionId
= null
$title
The historic page title
public
string|null
$title
= null
$updatedAt
The time when this revision was saved
public
string|null
$updatedAt
= null
$url
The historic URL of the page
public
string|null
$url
= null
Methods
__construct()
Constructor
public
__construct([array<string, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string, mixed> = []
getBody()
Get body
public
getBody() : string|null
Return values
string|nullgetEditedBy()
Get edited by user
public
getEditedBy() : array<string, mixed>|null
Return values
array<string, mixed>|nullgetLatest()
Get latest status
public
getLatest() : bool|null
Return values
bool|nullgetRevisionId()
Get revision ID
public
getRevisionId() : int|null
Return values
int|nullgetTitle()
Get title
public
getTitle() : string|null
Return values
string|nullgetUpdatedAt()
Get updated at timestamp
public
getUpdatedAt() : string|null
Return values
string|nullgetUrl()
Get URL
public
getUrl() : string|null
Return values
string|nullisLatest()
Check if this is the latest revision
public
isLatest() : bool
Return values
boolsetBody()
Set body
public
setBody(string|null $body) : void
Parameters
- $body : string|null
setEditedBy()
Set edited by user
public
setEditedBy(array<string, mixed>|null $editedBy) : void
Parameters
- $editedBy : array<string, mixed>|null
setLatest()
Set latest status
public
setLatest(bool|null $latest) : void
Parameters
- $latest : bool|null
setRevisionId()
Set revision ID
public
setRevisionId(int|null $revisionId) : void
Parameters
- $revisionId : int|null
setTitle()
Set title
public
setTitle(string|null $title) : void
Parameters
- $title : string|null
setUpdatedAt()
Set updated at timestamp
public
setUpdatedAt(string|null $updatedAt) : void
Parameters
- $updatedAt : string|null
setUrl()
Set URL
public
setUrl(string|null $url) : void
Parameters
- $url : string|null
toArray()
Convert to array
public
toArray() : array<string, mixed>