# ConfigItem

class ConfigItem extends DataModel

A config Item that is displayed in a config Group. Config item can reference to a specific productId to inherit price, name and description.

## Properties

protected array | $fields |  | from DataModel
protected boolean | $isEncrypted |  | from DataModel
protected Identity | $configGroupId |  |
protected Identity | $id |  |
protected Identity | $productId |  |
protected integer | $ignoreMultiplier |  |
protected boolean | $inheritProductName |  |
protected boolean | $inheritProductPrice |  |
protected double | $initialQuantity |  |
protected boolean | $isPreSelected |  |
protected boolean | $isRecommended |  |
protected double | $maxQuantity |  |
protected double | $minQuantity |  |
protected boolean | $showDiscount |  |
protected boolean | $showSurcharge |  |
protected integer | $sort |  |
protected integer | $type |  |
protected ConfigItemI18n[] | $i18ns |  |
protected ConfigItemPrice[] | $prices |  |

## Methods

__construct()

Constructor

multitype:
getProperties()

Get the Model Properties

from Model
Model
setOptions(stdClass $object = null, array $options = null)

Sets Properties with matching Array Values

from DataModel
stdClass
getPublic(array $publics = array('fields', 'isEncrypted', 'identities', '_type'))

Convert the Model into stdClass Object

from DataModel
toJson()

No description

from Model
mixed:string
getFields()

Fields Getter

from DataModel
validate()

Object Validation

from DataModel
mixed:string|NULL
getField(boolean $toWawi = false, string $key)

Get a Model Member Name

from DataModel
map(boolean $toWawi = false, stdClass $obj = null)

Object Mapping

from DataModel
DataType
getModelType()

No description

from DataModel
boolean
isEncrypted()

Encrypted Status

from DataModel
setIdentity(string $propertyName, string|null $endpoint = null, int|null $host = null)

No description

from DataModel
setProperty($name, $value, $type)

No description

from DataModel
validateType($value, $type)

No description

from DataModel
ConfigItem
setConfigGroupId(Identity $configGroupId)

No description

Identity
getConfigGroupId()

No description

ConfigItem
setId(Identity $id)

No description

Identity
getId()

No description

ConfigItem
setProductId(Identity $productId)

No description

Identity
getProductId()

No description

ConfigItem
setIgnoreMultiplier(integer $ignoreMultiplier)

No description

integer
getIgnoreMultiplier()

No description

ConfigItem
setInheritProductName(boolean $inheritProductName)

No description

boolean
getInheritProductName()

No description

ConfigItem
setInheritProductPrice(boolean $inheritProductPrice)

No description

boolean
getInheritProductPrice()

No description

ConfigItem
setInitialQuantity(double $initialQuantity)

No description

double
getInitialQuantity()

No description

ConfigItem
setIsPreSelected(boolean $isPreSelected)

No description

boolean
getIsPreSelected()

No description

ConfigItem
setIsRecommended(boolean $isRecommended)

No description

boolean
getIsRecommended()

No description

ConfigItem
setMaxQuantity(double $maxQuantity)

No description

double
getMaxQuantity()

No description

ConfigItem
setMinQuantity(double $minQuantity)

No description

double
getMinQuantity()

No description

ConfigItem
setShowDiscount(boolean $showDiscount)

No description

boolean
getShowDiscount()

No description

ConfigItem
setShowSurcharge(boolean $showSurcharge)

No description

boolean
getShowSurcharge()

No description

ConfigItem
setSort(integer $sort)

No description

integer
getSort()

No description

ConfigItem
setType(integer $type)

No description

integer
getType()

No description

ConfigItem
addI18n(ConfigItemI18n $i18n)

No description

ConfigItem
setI18ns(array $i18ns)

No description

ConfigItemI18n[]
getI18ns()

No description

ConfigItem
clearI18ns()

No description

ConfigItem
addPrice(ConfigItemPrice $price)

No description

ConfigItem
setPrices(array $prices)

No description

ConfigItemPrice[]
getPrices()

No description

ConfigItem
clearPrices()

No description

## Details

###
at line 163
`__construct()`

Constructor

###
in Model at line 33
`multitype: getProperties()`

Get the Model Properties

#### Return Value

multitype: | string

###
in DataModel at line 172
`Model setOptions(stdClass $object = null, array $options = null)`

Sets Properties with matching Array Values

#### Parameters

stdClass | $object |
array | $options |

#### Return Value

Model |

###
in DataModel at line 70
`stdClass getPublic(array $publics = array('fields', 'isEncrypted', 'identities', '_type'))`

Convert the Model into stdClass Object

#### Parameters

array | $publics |

#### Return Value

stdClass | $object

###
in Model at line 115
`toJson()`

###
in DataModel at line 35
`mixed:string getFields()`

Fields Getter

#### Return Value

mixed:string |

###
in DataModel at line 45
`validate()`

Object Validation

#### Exceptions

SchemaException |

###
in DataModel at line 59
`mixed:string|NULL getField(boolean $toWawi = false, string $key)`

Get a Model Member Name

#### Parameters

boolean | $toWawi |
string | $key |

#### Return Value

mixed:string|NULL |

###
in DataModel at line 81
`map(boolean $toWawi = false, stdClass $obj = null)`

Object Mapping

#### Parameters

boolean | $toWawi |
stdClass | $obj | Object to map

###
in DataModel at line 42
`DataType getModelType()`

#### Return Value

DataType |

###
in DataModel at line 59
`boolean isEncrypted()`

Encrypted Status

#### Return Value

boolean |

###
in DataModel at line 123
`setIdentity(string $propertyName, string|null $endpoint = null, int|null $host = null)`

#### Parameters

string | $propertyName |
string|null | $endpoint |
int|null | $host |

###
in DataModel at line 179
`protected setProperty($name, $value, $type)`

#### Parameters

| $name |
| $value |
| $type |

###
in DataModel at line 190
`protected validateType($value, $type)`

#### Parameters

| $value |
| $type |

###
at line 175
`ConfigItem setConfigGroupId(Identity $configGroupId)`

#### Parameters

Identity | $configGroupId | Reference to configGroup

#### Return Value

ConfigItem |

#### Exceptions

InvalidArgumentException | if the provided argument is not of type 'Identity'.

###
at line 183
`Identity getConfigGroupId()`

#### Return Value

Identity | Reference to configGroup

###
at line 193
`ConfigItem setId(Identity $id)`

#### Parameters

Identity | $id | Unique configItem id

#### Return Value

ConfigItem |

#### Exceptions

InvalidArgumentException | if the provided argument is not of type 'Identity'.

###
at line 201
`Identity getId()`

#### Return Value

Identity | Unique configItem id

###
at line 211
`ConfigItem setProductId(Identity $productId)`

#### Parameters

Identity | $productId | Optional reference to product

#### Return Value

ConfigItem |

#### Exceptions

InvalidArgumentException | if the provided argument is not of type 'Identity'.

###
at line 219
`Identity getProductId()`

#### Return Value

Identity | Optional reference to product

###
at line 228
`ConfigItem setIgnoreMultiplier(integer $ignoreMultiplier)`

#### Parameters

integer | $ignoreMultiplier | Optional:Ignore multiplier. If true, quantity of config item will not be increased if product quantity is increased

#### Return Value

ConfigItem |

###
at line 236
`integer getIgnoreMultiplier()`

#### Return Value

integer | Optional:Ignore multiplier. If true, quantity of config item will not be increased if product quantity is increased

###
at line 245
`ConfigItem setInheritProductName(boolean $inheritProductName)`

#### Parameters

boolean | $inheritProductName | Optional: Inherit product name and description if productId is set. If true, configItem name will be received from referenced product and configItemI18n name will be ignored.

#### Return Value

ConfigItem |

###
at line 253
`boolean getInheritProductName()`

#### Return Value

boolean | Optional: Inherit product name and description if productId is set. If true, configItem name will be received from referenced product and configItemI18n name will be ignored.

###
at line 262
`ConfigItem setInheritProductPrice(boolean $inheritProductPrice)`

#### Parameters

boolean | $inheritProductPrice | Optional: Inherit product price of referenced productId. If true, configItem price will be the same as referenced product price.

#### Return Value

ConfigItem |

###
at line 270
`boolean getInheritProductPrice()`

#### Return Value

boolean | Optional: Inherit product price of referenced productId. If true, configItem price will be the same as referenced product price.

###
at line 279
`ConfigItem setInitialQuantity(double $initialQuantity)`

#### Parameters

double | $initialQuantity | Optional initial / predefined quantity. Default is one (1) quantity piece.

#### Return Value

ConfigItem |

###
at line 287
`double getInitialQuantity()`

#### Return Value

double | Optional initial / predefined quantity. Default is one (1) quantity piece.

###
at line 296
`ConfigItem setIsPreSelected(boolean $isPreSelected)`

#### Parameters

boolean | $isPreSelected | Optional: Preselect configItem. If true, configItem will be preselected or prechecked.

#### Return Value

ConfigItem |

###
at line 304
`boolean getIsPreSelected()`

#### Return Value

boolean | Optional: Preselect configItem. If true, configItem will be preselected or prechecked.

###
at line 313
`ConfigItem setIsRecommended(boolean $isRecommended)`

#### Parameters

boolean | $isRecommended | Optional: Highlight or recommend config item. If true, configItem will be recommended/highlighted.

#### Return Value

ConfigItem |

###
at line 321
`boolean getIsRecommended()`

#### Return Value

boolean | Optional: Highlight or recommend config item. If true, configItem will be recommended/highlighted.

###
at line 330
`ConfigItem setMaxQuantity(double $maxQuantity)`

#### Parameters

double | $maxQuantity | Maximum allowed quantity. Default 0 for no maximum limit.

#### Return Value

ConfigItem |

###
at line 338
`double getMaxQuantity()`

#### Return Value

double | Maximum allowed quantity. Default 0 for no maximum limit.

###
at line 347
`ConfigItem setMinQuantity(double $minQuantity)`

#### Parameters

double | $minQuantity | Optional minimum quantity required to add configItem. Default 0 for no minimum quantity.

#### Return Value

ConfigItem |

###
at line 355
`double getMinQuantity()`

#### Return Value

double | Optional minimum quantity required to add configItem. Default 0 for no minimum quantity.

###
at line 364
`ConfigItem setShowDiscount(boolean $showDiscount)`

#### Parameters

boolean | $showDiscount | Optional: Show discount compared to productId price. If true, the discount compared to referenct product price will be shown.

#### Return Value

ConfigItem |

###
at line 372
`boolean getShowDiscount()`

#### Return Value

boolean | Optional: Show discount compared to productId price. If true, the discount compared to referenct product price will be shown.

###
at line 381
`ConfigItem setShowSurcharge(boolean $showSurcharge)`

#### Parameters

boolean | $showSurcharge | Optional: Show surcharge compared to productId price.

#### Return Value

ConfigItem |

###
at line 389
`boolean getShowSurcharge()`

#### Return Value

boolean | Optional: Show surcharge compared to productId price.

###
at line 398
`ConfigItem setSort(integer $sort)`

#### Parameters

integer | $sort | Optional sort order number

#### Return Value

ConfigItem |

###
at line 406
`integer getSort()`

#### Return Value

integer | Optional sort order number

###
at line 415
`ConfigItem setType(integer $type)`

#### Parameters

integer | $type | Config item type. 0: Product, 1: Special

#### Return Value

ConfigItem |

###
at line 423
`integer getType()`

#### Return Value

integer | Config item type. 0: Product, 1: Special

###
at line 432
`ConfigItem addI18n(ConfigItemI18n $i18n)`

#### Parameters

ConfigItemI18n | $i18n |

#### Return Value

ConfigItem |

###
at line 442
`ConfigItem setI18ns(array $i18ns)`

#### Parameters

array | $i18ns |

#### Return Value

ConfigItem |

###
at line 451
`ConfigItemI18n[] getI18ns()`

#### Return Value

ConfigItemI18n[] |

###
at line 459
`ConfigItem clearI18ns()`

#### Return Value

ConfigItem |

###
at line 469
`ConfigItem addPrice(ConfigItemPrice $price)`

#### Parameters

ConfigItemPrice | $price |

#### Return Value

ConfigItem |

###
at line 479
`ConfigItem setPrices(array $prices)`

#### Parameters

array | $prices |

#### Return Value

ConfigItem |

###
at line 488
`ConfigItemPrice[] getPrices()`

#### Return Value

ConfigItemPrice[] |

###
at line 496
`ConfigItem clearPrices()`

#### Return Value

ConfigItem |