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(string typeAlias, int id) : bool
static
since |
4.0.0 |
---|
Arguments
- typeAlias
string
Typealias of the component- id
int
ID of the content item to delete
Response
bool
true 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
string
Typealias of the component- id
int
ID 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
string
Typealias of the content type- id
int
ID of the content item- data
mixed
Array or object of data that can be en- and decoded into JSON- note
string
Note for the version to store
Response
bool
True on success, otherwise false.