CSItemComparatorItem
in package
The main class for CSItemComparator.
This class is a wrapper for CSItemApiItem. It provides various function to load the desired Item in different languages/versions.
Tags
Table of Contents
- getComparator() : CSItemComparator
- Return the corresponding CSItemComparator object.
- getComparatorItem() : CSItemComparatorItem
- The constructor for CSItemComparatorItem class.
- getData() : array<string|int, mixed>
- Return stored data.
- getDataForKey() : mixed
- Return stored data for given key.
- getHash() : string
- Gets an unique hash id.
- getId() : int
- Gets the ID of the referenced item.
- getItem() : CSItemApiItem|Item
- This method load the referenced item with the setted version and language as well.
- getLabel() : string
- Gets the label of the item.
- getLanguageDetails() : array<string|int, mixed>
- Returns an array with available languages that have this item.
- getLanguageId() : int
- Returns the setted language ID.
- getPreviewDetails() : array<string|int, mixed>
- Returns preview details of the item
- getSelf() : CSItemComparatorItem
- This method load the referenced item in the current setted version and language as well.
- getVersion() : int
- Returns the setted version.
- getVersions() : array<string|int, mixed>
- Returns all possible version of the referenced item.
- getVersionsDetails() : array<string|int, mixed>
- Returns details to all versions of referenced item.
- isAdaptable() : bool
- Returns the boolean if the the current item is adaptable.
- isCheckedOut() : bool
- Returns whether the current item is checked out or not.
- isCurrentVersion() : bool
- Checks if the current version is the latest version.
- mayCheckOut() : bool
- Returns the boolean if the current item may be checked out.
- setData() : void
- Sets additional data to the ItemComparatorItem.
- setLanguageId() : bool
- Sets the language ID.
- setVersion() : bool
- Sets the version number.
Methods
getComparator()
Return the corresponding CSItemComparator object.
public
getComparator() : CSItemComparator
Tags
Return values
CSItemComparator —getComparatorItem()
The constructor for CSItemComparatorItem class.
public
static getComparatorItem(CSItemApiItem $oItem, CSItemComparator $oComparator) : CSItemComparatorItem
Parameters
- $oItem : CSItemApiItem
- $oComparator : CSItemComparator
Tags
Return values
CSItemComparatorItem —getData()
Return stored data.
public
getData() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getDataForKey()
Return stored data for given key.
public
getDataForKey(mixed $sKey) : mixed
Parameters
- $sKey : mixed
Tags
Return values
mixed —getHash()
Gets an unique hash id.
public
getHash() : string
Tags
Return values
string —getId()
Gets the ID of the referenced item.
public
getId() : int
Tags
Return values
int —getItem()
This method load the referenced item with the setted version and language as well.
public
getItem() : CSItemApiItem|Item
Returns the referenced item.
Tags
Return values
CSItemApiItem|Item —getLabel()
Gets the label of the item.
public
getLabel() : string
Tags
Return values
string —getLanguageDetails()
Returns an array with available languages that have this item.
public
getLanguageDetails() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getLanguageId()
Returns the setted language ID.
public
getLanguageId() : int
Tags
Return values
int —getPreviewDetails()
Returns preview details of the item
public
getPreviewDetails() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getSelf()
This method load the referenced item in the current setted version and language as well.
public
getSelf() : CSItemComparatorItem
Returns its self.
Tags
Return values
CSItemComparatorItem —getVersion()
Returns the setted version.
public
getVersion() : int
Tags
Return values
int —getVersions()
Returns all possible version of the referenced item.
public
getVersions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getVersionsDetails()
Returns details to all versions of referenced item.
public
getVersionsDetails() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —isAdaptable()
Returns the boolean if the the current item is adaptable.
public
isAdaptable() : bool
Tags
Return values
bool —isCheckedOut()
Returns whether the current item is checked out or not.
public
isCheckedOut([bool $bIsCheckedOutForCurrentUser = true ]) : bool
Parameters
- $bIsCheckedOutForCurrentUser : bool = true
Tags
Return values
bool —isCurrentVersion()
Checks if the current version is the latest version.
public
isCurrentVersion() : bool
Tags
Return values
bool —mayCheckOut()
Returns the boolean if the current item may be checked out.
public
mayCheckOut() : bool
Tags
Return values
bool —setData()
Sets additional data to the ItemComparatorItem.
public
setData(array<string|int, mixed> $aData) : void
The stored data is language and version independent. Can be used to store various data on item and can retrieved later on.
Parameters
- $aData : array<string|int, mixed>
Tags
Return values
void —setLanguageId()
Sets the language ID.
public
setLanguageId(int $iLanguageId) : bool
Which will be loaded on call of getItem() method.
Parameters
- $iLanguageId : int
Tags
Return values
bool —Return true if successfully set otherwise false
setVersion()
Sets the version number.
public
setVersion(mixed $iVersionNr) : bool
Which will be loaded on call of getItem() method.
Parameters
- $iVersionNr : mixed
Tags
Return values
bool —Return true if successfully set otherwise false
