CSItemApiTableHistory
extends CSItemApiHistory
in package
Defines API method of Item Action History in the ItemModell
Tags
Table of Contents
- __call() : mixed
- Relay function calls to item this function is used if a function was called that is not available from this class
- __construct() : mixed
- Instantiates the CSItemApiTableHistory
- deleteAllVersions() : void
- deletes all versions of the current item
- deleteVersion() : void
- deletes the version with the given version number
- dropOlderVersions() : int
- Delete versions prior to the given version number
- getChanges() : array<string|int, mixed>
- Retrieve list of history changes that occurred between two versions of tables.
- getEntries() : array<string|int, mixed>
- Fetches all entries that are available from the history database for the given item.
- getVersionNumbers() : array<string|int, mixed>
- Retrieve list of version numbers that are available from the action history database of the current item
- restoreVersion() : CSItemApiItem
- overwrite current version with data from a previous version
- rollback() : mixed
- Rollbacks the current item to a given version number while deleting all item versions that have been created after this one
Methods
__call()
Relay function calls to item this function is used if a function was called that is not available from this class
public
__call(mixed $name, mixed $arguments) : mixed
Parameters
- $name : mixed
-
function name
- $arguments : mixed
Tags
Return values
mixed —__construct()
Instantiates the CSItemApiTableHistory
public
__construct(object $oItemTable) : mixed
Parameters
- $oItemTable : object
-
instance of the item this Api shall be referring to
Tags
Return values
mixed —deleteAllVersions()
deletes all versions of the current item
public
deleteAllVersions() : void
Tags
Return values
void —deleteVersion()
deletes the version with the given version number
public
deleteVersion(int $versionNr) : void
Parameters
- $versionNr : int
-
the number of the version to delete
Tags
Return values
void —dropOlderVersions()
Delete versions prior to the given version number
public
dropOlderVersions(int $versionNr) : int
Parameters
- $versionNr : int
-
Last version that should be kept
Tags
Return values
int —Number of deleted version items
getChanges()
Retrieve list of history changes that occurred between two versions of tables.
public
getChanges(int $iSelectedVersion[, int $iLanguageId = null ]) : array<string|int, mixed>
database of the current item
Parameters
- $iSelectedVersion : int
- $iLanguageId : int = null
Tags
Return values
array<string|int, mixed> —getEntries()
Fetches all entries that are available from the history database for the given item.
public
getEntries([string $filter = '' ][, string $sortOrder = null ]) : array<string|int, mixed>
Parameters
- $filter : string = ''
-
a filter that should be used to load the entries
- $sortOrder : string = null
-
the sort order that should be used
Tags
Return values
array<string|int, mixed> —Returns an array of Itemactionhistory elements Itemactionhistory
getVersionNumbers()
Retrieve list of version numbers that are available from the action history database of the current item
public
getVersionNumbers([string $filter = '' ]) : array<string|int, mixed>
Parameters
- $filter : string = ''
-
a sql filter that should be used to load the entries
Tags
Return values
array<string|int, mixed> —Contains all version numbers
restoreVersion()
overwrite current version with data from a previous version
public
restoreVersion(mixed $versionNr) : CSItemApiItem
Parameters
- $versionNr : mixed
-
version number of source
Tags
Return values
CSItemApiItem —rollback()
Rollbacks the current item to a given version number while deleting all item versions that have been created after this one
public
rollback(int $targetVersionNr) : mixed
Parameters
- $targetVersionNr : int
-
number of version number to rollback to
