class Attribute extends Attribute implements PrimaryKeyInterface, Serializable, CSVEntityInterface, RelationshipEntityInterface

Class Attribute

Properties

protected string $name Attribute name from Attribute
protected string $type One of the predefined(CHECK, RADIO, SELECT) Currently supported types: "RADIO" from Attribute
protected string $attributeType Attribute type. One of the predefined(information type, file type, price type) Currently supported types: "information type" and "price type" from Attribute
protected string $typeOfValues Type of values Currently supported types: "number" from Attribute
protected int $code Unique identifier for attribute
protected string $erpCode Unique identifier for attribute. Used for synchronization with erp
protected bool $displayToUser Should display on frontend
protected bool $nameDependency Indicates if attribute is name dependency.

Methods

string
getType()

No description

from Attribute
mixed
setType(string $type)

No description

from Attribute
mixed
setName(string $name)

No description

from Attribute
string
getName()

No description

from Attribute
static array
getAttributeAllTypes()

No description

from Attribute
string
getAttributeType()

No description

from Attribute
setAttributeType(string $attributeType)

No description

from Attribute
string
getTypeOfValues()

No description

from Attribute
setTypeOfValues(string $typeOfValues)

No description

from Attribute
string
getErpCode()

No description

setErpCode(string $erpCode)

No description

__construct()

Attribute constructor.

ArrayCollection
getAttributeSets()

No description

setAttributeSets(ArrayCollection $attributeSets)

No description

addAttributeSet(AttributeSet $attributeSet)

No description

removeAttributeSet(AttributeSet $attributeSet)

No description

integer
getId()

No description

setId(int $id)

No description

addAttributeValue(AttributeValue $attributeValue)

No description

removeAttributeValue(AttributeValue $attributeValue)

No description

Collection
getValues()

No description

setValues(mixed|null $values)

No description

boolean
isDisplayToUser()

No description

setDisplayToUser(boolean $displayToUser)

No description

int
getCode()

No description

setCode(int $code)

No description

bool
isNameDependency()

No description

setNameDependency(bool $nameDependency)

No description

ArrayCollection|array
getSortedAttributeValues(array $usedValues)

Return sorted attribute values for attribute(based on priority field in attribute value)

setCustomCSVHeader(array $customCSVHeader)

No description

array
getCSVHeader()

No description

array
getCSVValues()

No description

setCSVValues($csvRow, mixed $locale, array $csvHeaders, array $propertyMappings = array())

No description

int
getPriority()

No description

setPriority(int $priority)

No description

string
serialize()

(PHP 5 >= 5.1.0)
String representation of object

void
unserialize(string $serialized)

(PHP 5 >= 5.1.0)
Constructs the object

Details

in Attribute at line 84
string getType()

Return Value

string

in Attribute at line 94
mixed setType(string $type)

Parameters

string $type

Return Value

mixed

in Attribute at line 106
mixed setName(string $name)

Parameters

string $name

Return Value

mixed

in Attribute at line 116
string getName()

Return Value

string

in Attribute at line 124
static array getAttributeAllTypes()

Return Value

array

in Attribute at line 132
string getAttributeType()

Return Value

string

in Attribute at line 142
Attribute setAttributeType(string $attributeType)

Parameters

string $attributeType

Return Value

Attribute

in Attribute at line 152
string getTypeOfValues()

Return Value

string

in Attribute at line 162
Attribute setTypeOfValues(string $typeOfValues)

Parameters

string $typeOfValues

Return Value

Attribute

at line 140
string getErpCode()

Return Value

string

at line 150
Attribute setErpCode(string $erpCode)

Parameters

string $erpCode

Return Value

Attribute

at line 160
__construct()

Attribute constructor.

at line 169
ArrayCollection getAttributeSets()

Return Value

ArrayCollection

at line 179
Attribute setAttributeSets(ArrayCollection $attributeSets)

Parameters

ArrayCollection $attributeSets

Return Value

Attribute

at line 191
Attribute addAttributeSet(AttributeSet $attributeSet)

Parameters

AttributeSet $attributeSet

Return Value

Attribute

at line 203
Attribute removeAttributeSet(AttributeSet $attributeSet)

Parameters

AttributeSet $attributeSet

Return Value

Attribute

at line 213
integer getId()

Return Value

integer

at line 223
Attribute setId(int $id)

Parameters

int $id

Return Value

Attribute

at line 235
Attribute addAttributeValue(AttributeValue $attributeValue)

Parameters

AttributeValue $attributeValue

Return Value

Attribute

at line 248
Attribute removeAttributeValue(AttributeValue $attributeValue)

Parameters

AttributeValue $attributeValue

Return Value

Attribute

at line 258
Collection getValues()

Return Value

Collection

at line 268
Attribute setValues(mixed|null $values)

Parameters

mixed|null $values

Return Value

Attribute

at line 278
boolean isDisplayToUser()

Return Value

boolean

at line 288
Attribute setDisplayToUser(boolean $displayToUser)

Parameters

boolean $displayToUser

Return Value

Attribute

at line 298
int getCode()

Return Value

int

at line 308
Attribute setCode(int $code)

Parameters

int $code

Return Value

Attribute

at line 318
bool isNameDependency()

Return Value

bool

at line 328
Attribute setNameDependency(bool $nameDependency)

Parameters

bool $nameDependency

Return Value

Attribute

at line 342
ArrayCollection|array getSortedAttributeValues(array $usedValues)

Return sorted attribute values for attribute(based on priority field in attribute value)

Parameters

array $usedValues

Return Value

ArrayCollection|array

at line 376
Attribute setCustomCSVHeader(array $customCSVHeader)

Parameters

array $customCSVHeader

Return Value

Attribute

at line 386
array getCSVHeader()

Return Value

array

at line 404
array getCSVValues()

Return Value

array

at line 426
CSVEntityInterface setCSVValues($csvRow, mixed $locale, array $csvHeaders, array $propertyMappings = array())

Parameters

$csvRow
mixed $locale
array $csvHeaders
array $propertyMappings

Return Value

CSVEntityInterface

at line 467
int getPriority()

Return Value

int

at line 477
Attribute setPriority(int $priority)

Parameters

int $priority

Return Value

Attribute

at line 491
string serialize()

(PHP 5 >= 5.1.0)
String representation of object

Return Value

string the string representation of the object or null

at line 511
void unserialize(string $serialized)

(PHP 5 >= 5.1.0)
Constructs the object

Parameters

string $serialized The string representation of the object.

Return Value

void