Versioning

Handle the versioning of content items

since

4.0.0

Methods

delete

Method to delete the history for an item.

delete(string $typeAlias, integer $id) : boolean
static
since

4.0.0

Arguments

$typeAlias

stringTypealias of the component

$id

integerID of the content item to delete

Response

booleantrue on success, otherwise false.

get

Method to get a list of available versions of this item.

get(string $typeAlias, integer $id) : array<mixed,object>
static
since

4.0.0

Arguments

$typeAlias

stringTypealias of the component

$id

integerID of the content item to get

Response

array<mixed,object>A list of history items

store

Method to save a version snapshot to the content history table.

store(string $typeAlias, integer $id, mixed $data, string $note = '') : boolean
static
since

4.0.0

Arguments

$typeAlias

stringTypealias of the content type

$id

integerID of the content item

$data

mixedArray or object of data that can be en- and decoded into JSON

$note

stringNote for the version to store

Response

booleanTrue on success, otherwise false.