Versioning

Handle the versioning of content items

since

4.0.0

package

Joomla CMS

Methods

delete

Method to delete the history for an item.

delete( typeAlias,  id) : 
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( typeAlias,  id) : object||string|int
static
since

4.0.0

Arguments

typeAlias

stringTypealias of the component

id

intID of the content item to get

Response

array<string|int, object>A list of history items

store

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

store( typeAlias,  id,  data,  note = '') : 
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.