Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
AttributeMetadata Class Reference
Inheritance diagram for AttributeMetadata:
AbstractSimpleObject MetadataObjectInterface

Public Member Functions

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

Data Fields

const ATTRIBUTE_CODE = 'attribute_code'
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractSimpleObject
 _get ($key)
 
- Protected Attributes inherited from AbstractSimpleObject
 $_data
 

Detailed Description

Base data object for custom attribute metadata

Definition at line 12 of file AttributeMetadata.php.

Member Function Documentation

◆ getAttributeCode()

getAttributeCode ( )

Retrieve code of the attribute.

Returns
string|null

Implements MetadataObjectInterface.

Definition at line 21 of file AttributeMetadata.php.

22  {
23  return $this->_get(self::ATTRIBUTE_CODE);
24  }

◆ setAttributeCode()

setAttributeCode (   $attributeCode)

Set code of the attribute.

Parameters
string$attributeCode
Returns
$this

Implements MetadataObjectInterface.

Definition at line 32 of file AttributeMetadata.php.

33  {
34  return $this->setData(self::ATTRIBUTE_CODE, $attributeCode);
35  }
$attributeCode
Definition: extend.phtml:12

Field Documentation

◆ ATTRIBUTE_CODE

const ATTRIBUTE_CODE = 'attribute_code'

Definition at line 14 of file AttributeMetadata.php.


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