Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
AbstractType Class Reference
Inheritance diagram for AbstractType:
Bundle Simple Configurable Grouped

Public Member Functions

 getDisabledAttrs ()
 
 getIndexValueAttributes ()
 
 isSuitable ()
 
 overrideAttribute (Attribute $attribute)
 

Protected Attributes

 $_attributeOverrides = []
 
 $_disabledAttrs = []
 
 $_indexValueAttributes = []
 

Detailed Description

Export entity product type abstract model

@api

Since
100.0.2

Definition at line 16 of file AbstractType.php.

Member Function Documentation

◆ getDisabledAttrs()

getDisabledAttrs ( )

Return disabled attributes codes.

Returns
string[]

Definition at line 44 of file AbstractType.php.

◆ getIndexValueAttributes()

getIndexValueAttributes ( )

Get attribute codes with index (not label) value.

Returns
string[]

Definition at line 54 of file AbstractType.php.

◆ isSuitable()

isSuitable ( )

Additional check for model availability. If method returns FALSE - model is not suitable for data processing.

Returns
bool

Definition at line 64 of file AbstractType.php.

65  {
66  return true;
67  }

◆ overrideAttribute()

overrideAttribute ( Attribute  $attribute)

Add additional data to attribute.

Parameters
Attribute$attribute
Returns
bool

Definition at line 75 of file AbstractType.php.

76  {
77  if (!empty($this->_attributeOverrides[$attribute->getAttributeCode()])) {
78  $data = $this->_attributeOverrides[$attribute->getAttributeCode()];
79 
80  if (isset($data['options_method']) && method_exists($this, $data['options_method'])) {
81  $data['filter_options'] = $this->{$data['options_method']}();
82  }
83  $attribute->addData($data);
84 
85  return true;
86  }
87  return false;
88  }

Field Documentation

◆ $_attributeOverrides

$_attributeOverrides = []
protected

Definition at line 23 of file AbstractType.php.

◆ $_disabledAttrs

$_disabledAttrs = []
protected

Definition at line 30 of file AbstractType.php.

◆ $_indexValueAttributes

$_indexValueAttributes = []
protected

Definition at line 37 of file AbstractType.php.


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