Versioning

Handle the versioning of content items

since

4.0.0

package

Application

Methods

delete

Method to delete the history for an item.

delete(string typeAlias, int id) : bool
static
since

4.0.0

Arguments

typeAlias

stringTypealias of the component

id

intID of the content item to delete

Response

booltrue on success, otherwise false.

get

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

get(string typeAlias, int id) : object[]
static
since

4.0.0

Arguments

typeAlias

stringTypealias of the component

id

intID of the content item to get

Response

object[]A list of history items

store

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

store(string typeAlias, int id, mixed data, string note = '') : bool
static
since

4.0.0

Arguments

typeAlias

stringTypealias of the content type

id

intID 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

boolTrue on success, otherwise false.