Contentserv PHP API

CSItemComparator

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

getIncompatibleAttributes()

public getIncompatibleAttributes() : mixed
Tags
Return values
mixed

getItemsDefinition()

public getItemsDefinition() : mixed
Tags
Return values
mixed

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

setAdaptable()

De-/activate the comparator to adapt the values.

public setAdaptable(bool $bIsAdaptable) : mixed
Parameters
$bIsAdaptable : bool
Tags
Return values
mixed

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
throws
CSItemException

Throws an exception if the type of given id is wrong.

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
Tags
throws
CSItemException
Return values
mixed

        

Search results