CSItemComparator
in package
Tags
Table of Contents
- addItem() : mixed
- checkParam() : mixed
- checkParams() : mixed
- createDetailsArray() : array<string|int, mixed>
- Creates an array with defined keys. Those keys are used on client side.
- getAllowedItemsParams() : mixed
- getAttributeDefinition() : mixed
- getAttributeDefinitions() : mixed
- getComparator() : CSItemComparator
- Returns a new instance of a CSItemComparator.
- getComparatorData() : CSItemComparatorData
- Returns a CSItemComparatorData data object.
- getCompleteItemDefinition() : mixed
- getIncompatibleAttributes() : mixed
- getItemDefinition() : mixed
- getItems() : array<string|int, CSItemComparatorItem>
- Return an array of CSItemComparatorItem objects
- getItemsDefinition() : mixed
- getMasterItem() : CSItemComparatorItem
- Gets the master item.
- getMasterItemHash() : string
- Returns the unique hash of the master item.
- getMasterItemId() : int
- Gets the id of the setted master item.
- getMode() : string
- Returns the current Comparator Mode.
- getOptionalItemsParams() : mixed
- getRecordType() : string
- Returns the current record type.
- getValue() : mixed
- Gets a value with medium CSITEM_VALUES_COMPARATOR of the given item and attribute id.
- initItems() : mixed
- This function initialize items data.
- isAdaptable() : bool
- Returns whether the comparator is adaptable or not.
- isAddableAttribute() : bool
- isMasterItem() : bool
- Checks if the given comparator item is the master item.
- isReplaceableAttribute() : bool
- Checks whether an attribute is replaceable for the item comparator.
- setAdaptable() : mixed
- De-/activate the comparator to adapt the values.
- setComparatorData() : mixed
- Set the CSItemComparatorData data.
- setItem() : CSItemComparatorItem
- Sets multiple items.
- setMasterItem() : CSItemComparatorItem
- Sets the master item to given item.
- setMasterItemHash() : mixed
- Sets the unique hash of the master item to the current comparator object.
- setMasterItemId() : void
- Sets the id of the master item.
- setRecordType() : mixed
- Sets a recordtype of the current comparator.
- throwException() : mixed
- Throws an item execption.
Methods
addItem()
public
addItem(mixed $iId, mixed $iLangId, mixed $iVersionNr[, mixed $bIsMaster = FALSE ][, mixed $aNewData = array() ]) : mixed
Parameters
- $iId : mixed
- $iLangId : mixed
- $iVersionNr : mixed
- $bIsMaster : mixed = FALSE
- $aNewData : mixed = array()
Tags
Return values
mixed —checkParam()
public
checkParam(mixed $mKey) : mixed
Parameters
- $mKey : mixed
Tags
Return values
mixed —checkParams()
public
checkParams(mixed $aItems) : mixed
Parameters
- $aItems : mixed
Tags
Return values
mixed —createDetailsArray()
Creates an array with defined keys. Those keys are used on client side.
public
createDetailsArray(mixed $sValue, mixed $sText[, array<string|int, mixed> $aAdditionalParams = array() ]) : array<string|int, mixed>
Parameters
- $sValue : mixed
- $sText : mixed
- $aAdditionalParams : array<string|int, mixed> = array()
Tags
Return values
array<string|int, mixed> —getAllowedItemsParams()
public
getAllowedItemsParams() : mixed
Tags
Return values
mixed —getAttributeDefinition()
public
getAttributeDefinition(CSItemComparatorItem $oItem, CSItemApiField $oAttribute) : mixed
Parameters
- $oItem : CSItemComparatorItem
- $oAttribute : CSItemApiField
Tags
Return values
mixed —getAttributeDefinitions()
public
getAttributeDefinitions(CSItemComparatorItem $oItem) : mixed
Parameters
- $oItem : CSItemComparatorItem
Tags
Return values
mixed —getComparator()
Returns a new instance of a CSItemComparator.
public
static getComparator(CSItemComparatorData $oComparatorData) : CSItemComparator
Parameters
- $oComparatorData : CSItemComparatorData
-
CSItemComparatorData object with already setted data.
Tags
Return values
CSItemComparator —getComparatorData()
Returns a CSItemComparatorData data object.
public
getComparatorData() : CSItemComparatorData
Tags
Return values
CSItemComparatorData —getCompleteItemDefinition()
public
getCompleteItemDefinition(CSItemComparatorItem $oItem) : mixed
Parameters
- $oItem : CSItemComparatorItem
Tags
Return values
mixed —getIncompatibleAttributes()
public
getIncompatibleAttributes() : mixed
Tags
Return values
mixed —getItemDefinition()
public
getItemDefinition(CSItemComparatorItem $oItem) : mixed
Parameters
- $oItem : CSItemComparatorItem
Tags
Return values
mixed —getItems()
Return an array of CSItemComparatorItem objects
public
getItems() : array<string|int, CSItemComparatorItem>
Tags
Return values
array<string|int, CSItemComparatorItem> —getItemsDefinition()
public
getItemsDefinition() : mixed
Tags
Return values
mixed —getMasterItem()
Gets the master item.
public
getMasterItem() : CSItemComparatorItem
Tags
Return values
CSItemComparatorItem —getMasterItemHash()
Returns the unique hash of the master item.
public
getMasterItemHash() : string
Tags
Return values
string —getMasterItemId()
Gets the id of the setted master item.
public
getMasterItemId() : int
Tags
Return values
int —getMode()
Returns the current Comparator Mode.
public
getMode() : string
Tags
Return values
string —Returns one of the following constants CSItemComparatorConst::MODE_*
getOptionalItemsParams()
public
getOptionalItemsParams() : mixed
Tags
Return values
mixed —getRecordType()
Returns the current record type.
public
getRecordType() : string
Tags
Return values
string —getValue()
Gets a value with medium CSITEM_VALUES_COMPARATOR of the given item and attribute id.
public
getValue(CSItemComparatorItem $oItem, int $iAttributeId[, mixed $bAllowInheritance = true ]) : mixed
Parameters
- $oItem : CSItemComparatorItem
- $iAttributeId : int
- $bAllowInheritance : mixed = true
Tags
Return values
mixed —initItems()
This function initialize items data.
public
initItems(mixed $aItems) : mixed
Parameters
- $aItems : mixed
Tags
Return values
mixed —isAdaptable()
Returns whether the comparator is adaptable or not.
public
isAdaptable() : bool
Tags
Return values
bool —isAddableAttribute()
public
isAddableAttribute(CSType $oCSType, CSItemApiField $oAttribute) : bool
Parameters
- $oCSType : CSType
- $oAttribute : CSItemApiField
Tags
Return values
bool —isMasterItem()
Checks if the given comparator item is the master item.
public
isMasterItem(CSItemComparatorItem $oItem) : bool
Parameters
- $oItem : CSItemComparatorItem
Tags
Return values
bool —isReplaceableAttribute()
Checks whether an attribute is replaceable for the item comparator.
public
isReplaceableAttribute(CSItemComparatorItem $oItem, CSItemApiField $oAttribute) : bool
Parameters
- $oItem : CSItemComparatorItem
- $oAttribute : CSItemApiField
Tags
Return values
bool —setAdaptable()
De-/activate the comparator to adapt the values.
public
setAdaptable(bool $bIsAdaptable) : mixed
Parameters
- $bIsAdaptable : bool
Tags
Return values
mixed —setComparatorData()
Set the CSItemComparatorData data.
public
setComparatorData(CSItemComparatorData $oComparatorData) : mixed
Parameters
- $oComparatorData : CSItemComparatorData
Tags
Return values
mixed —setItem()
Sets multiple items.
public
setItem(array<string|int, mixed> $aItem) : CSItemComparatorItem
Parameters
- $aItem : array<string|int, mixed>
Tags
Return values
CSItemComparatorItem —setMasterItem()
Sets the master item to given item.
public
setMasterItem(CSItemComparatorItem $oComparatorItem) : CSItemComparatorItem
The master id will be also set.
Parameters
- $oComparatorItem : CSItemComparatorItem
Tags
Return values
CSItemComparatorItem —setMasterItemHash()
Sets the unique hash of the master item to the current comparator object.
public
setMasterItemHash(string $sMasterItemHash) : mixed
Parameters
- $sMasterItemHash : string
Tags
Return values
mixed —setMasterItemId()
Sets the id of the master item.
public
setMasterItemId(int $iMasterItemID) : void
Parameters
- $iMasterItemID : int
Tags
Return values
void —setRecordType()
Sets a recordtype of the current comparator.
public
setRecordType(string $sRecordName) : mixed
Parameters
- $sRecordName : string
Tags
Return values
mixed —throwException()
Throws an item execption.
public
static throwException(mixed $sText[, int $iNumber = CSItemException::COMPARATOR_GENERAL ][, int $iType = E_ERROR ]) : mixed
Parameters
- $sText : mixed
- $iNumber : int = CSItemException::COMPARATOR_GENERAL
- $iType : int = E_ERROR
