class Category extends DataModel

A category with sort number, link to parent category and level

Properties

protected array $fields from DataModel
protected boolean $isEncrypted from DataModel
protected Identity $id
protected Identity $parentCategoryId
protected boolean $isActive
protected integer $level
protected integer $sort
protected CategoryAttr[] $attributes
protected CategoryCustomerGroup[] $customerGroups
protected CategoryI18n[] $i18ns
protected CategoryInvisibility[] $invisibilities

Methods

__construct()

Constructor

multitype:
getProperties()

Get the Model Properties

from 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
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
setId(Identity $id)

No description

getId()

No description

setParentCategoryId(Identity $parentCategoryId)

No description

getParentCategoryId()

No description

setIsActive(boolean $isActive)

No description

boolean
getIsActive()

No description

setLevel(integer $level)

No description

integer
getLevel()

No description

setSort(integer $sort)

No description

integer
getSort()

No description

addAttribute(CategoryAttr $attribute)

No description

setAttributes(array $attributes)

No description

getAttributes()

No description

clearAttributes()

No description

addCustomerGroup(CategoryCustomerGroup $customerGroup)

No description

setCustomerGroups(array $customerGroups)

No description

clearCustomerGroups()

No description

addI18n(CategoryI18n $i18n)

No description

setI18ns(array $i18ns)

No description

getI18ns()

No description

clearI18ns()

No description

addInvisibility(CategoryInvisibility $invisibility)

No description

setInvisibilities(array $invisibilities)

No description

clearInvisibilities()

No description

Details

at line 99
__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 110
Category setId(Identity $id)

Parameters

Identity $id Unique category id

Return Value

Category

Exceptions

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

at line 118
Identity getId()

Return Value

Identity Unique category id

at line 128
Category setParentCategoryId(Identity $parentCategoryId)

Parameters

Identity $parentCategoryId Optional reference to parent category id

Return Value

Category

Exceptions

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

at line 136
Identity getParentCategoryId()

Return Value

Identity Optional reference to parent category id

at line 145
Category setIsActive(boolean $isActive)

Parameters

boolean $isActive

Return Value

Category

at line 153
boolean getIsActive()

Return Value

boolean

at line 162
Category setLevel(integer $level)

Parameters

integer $level

Return Value

Category

at line 170
integer getLevel()

Return Value

integer

at line 179
Category setSort(integer $sort)

Parameters

integer $sort Optional sort order number

Return Value

Category

at line 187
integer getSort()

Return Value

integer Optional sort order number

at line 196
Category addAttribute(CategoryAttr $attribute)

Parameters

CategoryAttr $attribute

Return Value

Category

at line 206
Category setAttributes(array $attributes)

Parameters

array $attributes

Return Value

Category

at line 215
CategoryAttr[] getAttributes()

Return Value

CategoryAttr[]

at line 223
Category clearAttributes()

Return Value

Category

at line 233
Category addCustomerGroup(CategoryCustomerGroup $customerGroup)

Parameters

CategoryCustomerGroup $customerGroup

Return Value

Category

at line 243
Category setCustomerGroups(array $customerGroups)

Parameters

array $customerGroups

Return Value

Category

at line 252
CategoryCustomerGroup[] getCustomerGroups()

Return Value

CategoryCustomerGroup[]

at line 260
Category clearCustomerGroups()

Return Value

Category

at line 270
Category addI18n(CategoryI18n $i18n)

Parameters

CategoryI18n $i18n

Return Value

Category

at line 280
Category setI18ns(array $i18ns)

Parameters

array $i18ns

Return Value

Category

at line 289
CategoryI18n[] getI18ns()

Return Value

CategoryI18n[]

at line 297
Category clearI18ns()

Return Value

Category

at line 307
Category addInvisibility(CategoryInvisibility $invisibility)

Parameters

CategoryInvisibility $invisibility

Return Value

Category

at line 317
Category setInvisibilities(array $invisibilities)

Parameters

array $invisibilities

Return Value

Category

at line 326
CategoryInvisibility[] getInvisibilities()

Return Value

CategoryInvisibility[]

at line 334
Category clearInvisibilities()

Return Value

Category