Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
AttributeValue Class Reference
Inheritance diagram for AttributeValue:
AbstractSimpleObject AttributeInterface

Public Member Functions

 getAttributeCode ()
 
 getValue ()
 
 setAttributeCode ($attributeCode)
 
 setValue ($value)
 
- Public Member Functions inherited from AbstractSimpleObject
 __construct (array $data=[])
 
 setData ($key, $value)
 
 __toArray ()
 

Additional Inherited Members

- Data Fields inherited from AttributeInterface
const ATTRIBUTE_CODE = 'attribute_code'
 
const VALUE = 'value'
 
- Protected Member Functions inherited from AbstractSimpleObject
 _get ($key)
 
- Protected Attributes inherited from AbstractSimpleObject
 $_data
 

Detailed Description

Custom Attribute Data object

Definition at line 12 of file AttributeValue.php.

Member Function Documentation

◆ getAttributeCode()

getAttributeCode ( )

Get attribute code

Returns
string

Implements AttributeInterface.

Definition at line 19 of file AttributeValue.php.

20  {
21  return $this->_get(self::ATTRIBUTE_CODE);
22  }

◆ getValue()

getValue ( )

Get attribute value

Returns
mixed

Implements AttributeInterface.

Definition at line 29 of file AttributeValue.php.

30  {
31  return $this->_get(self::VALUE);
32  }

◆ setAttributeCode()

setAttributeCode (   $attributeCode)

Set attribute code

Parameters
string$attributeCode
Returns
$this

Implements AttributeInterface.

Definition at line 40 of file AttributeValue.php.

41  {
42  $this->_data[self::ATTRIBUTE_CODE] = $attributeCode;
43  return $this;
44  }
$attributeCode
Definition: extend.phtml:12

◆ setValue()

setValue (   $value)

Set attribute value

Parameters
mixed$value
Returns
$this

Implements AttributeInterface.

Definition at line 52 of file AttributeValue.php.

53  {
54  $this->_data[self::VALUE] = $value;
55  return $this;
56  }
$value
Definition: gender.phtml:16

The documentation for this class was generated from the following file: