Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\App\CacheInterface $cache, \Magento\Eav\Model\Entity\TypeFactory $entityTypeFactory, \Magento\Eav\Model\ResourceModel\Entity\Type\CollectionFactory $entityTypeCollectionFactory, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Validator\UniversalFactory $universalFactory, SerializerInterface $serializer=null) | |
getCache () | |
clear () | |
isCacheEnabled () | |
getEntityType ($code) | |
getAttributes ($entityType) | |
getAttribute ($entityType, $code) | |
getEntityAttributeCodes ($entityType, $object=null) | |
getEntityAttributes ($entityType, $object=null) | |
importAttributesData ($entityType, array $attributes) | |
Data Fields | |
const | ENTITIES_CACHE_ID = 'EAV_ENTITY_TYPES' |
const | ATTRIBUTES_CACHE_ID = 'EAV_ENTITY_ATTRIBUTES' |
const | ATTRIBUTES_CODES_CACHE_ID = 'EAV_ENTITY_ATTRIBUTES_CODES' |
Protected Member Functions | |
_load ($id) | |
_save ($obj, $id) | |
_addEntityTypeReference ($id, $code) | |
_getEntityTypeReference ($id) | |
_addAttributeReference ($id, $code, $entityTypeCode) | |
_getAttributeReference ($id, $entityTypeCode) | |
_getEntityKey ($code) | |
_getAttributeKey ($entityTypeCode, $attributeCode) | |
_initEntityTypes () | |
_initAttributes ($entityType) | |
_validateAttributeData ($attributeData=null) | |
@api @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 18 of file Config.php.
__construct | ( | \Magento\Framework\App\CacheInterface | $cache, |
\Magento\Eav\Model\Entity\TypeFactory | $entityTypeFactory, | ||
\Magento\Eav\Model\ResourceModel\Entity\Type\CollectionFactory | $entityTypeCollectionFactory, | ||
\Magento\Framework\App\Cache\StateInterface | $cacheState, | ||
\Magento\Framework\Validator\UniversalFactory | $universalFactory, | ||
SerializerInterface | $serializer = null |
||
) |
\Magento\Framework\App\CacheInterface | $cache | |
\Magento\Eav\Model\Entity\TypeFactory | $entityTypeFactory | |
\Magento\Eav\Model\ResourceModel\Entity\Type\CollectionFactory | $entityTypeCollectionFactory | |
\Magento\Framework\App\Cache\StateInterface | $cacheState | |
\Magento\Framework\Validator\UniversalFactory | $universalFactory | |
SerializerInterface | $serializer | @codeCoverageIgnore |
Definition at line 135 of file Config.php.
|
protected |
Specify reference between entity attribute id and attribute code
int | $id | |
string | $code | |
string | $entityTypeCode |
Definition at line 266 of file Config.php.
|
protected |
Specify reference for entity type id
int | $id | |
string | $code |
Definition at line 241 of file Config.php.
|
protected |
Get internal cache key for attribute object cache
string | $entityTypeCode | |
string | $attributeCode |
Definition at line 307 of file Config.php.
|
protected |
Get attribute code by attribute id
int | $id | |
string | $entityTypeCode |
Definition at line 279 of file Config.php.
|
protected |
Get internal cache key for entity type code
string | $code |
Definition at line 294 of file Config.php.
|
protected |
Get entity type code by id
int | $id |
Definition at line 253 of file Config.php.
|
protected |
Initialize all attributes for entity type
string | $entityType |
Definition at line 424 of file Config.php.
|
protected |
Initialize all entity types data
Definition at line 332 of file Config.php.
|
protected |
Get object by identifier
mixed | $id |
Definition at line 191 of file Config.php.
|
protected |
Associate object with identifier
mixed | $obj | |
mixed | $id |
Definition at line 215 of file Config.php.
|
protected |
Validate attribute data from import
array | $attributeData |
Definition at line 670 of file Config.php.
clear | ( | ) |
getAttribute | ( | $entityType, | |
$code | |||
) |
Get attribute by code for entity type
mixed | $entityType | |
mixed | $code |
Definition at line 492 of file Config.php.
getAttributes | ( | $entityType | ) |
Get attributes by entity type
string | $entityType |
Definition at line 479 of file Config.php.
getCache | ( | ) |
Get cache interface
Definition at line 157 of file Config.php.
getEntityAttributeCodes | ( | $entityType, | |
$object = null |
|||
) |
Get codes of all entity type attributes
mixed | $entityType | |
\Magento\Framework\DataObject | $object |
Definition at line 550 of file Config.php.
getEntityAttributes | ( | $entityType, | |
$object = null |
|||
) |
Get all entity type attributes
int | string | Type | $entityType | |
\Magento\Framework\DataObject | null | $object |
@SuppressWarnings(PHPMD.CyclomaticComplexity) @SuppressWarnings(PHPMD.NPathComplexity)
Definition at line 566 of file Config.php.
getEntityType | ( | $code | ) |
Get entity type object by entity type code/identifier
int | string | Type | $code |
Definition at line 383 of file Config.php.
importAttributesData | ( | $entityType, | |
array | $attributes | ||
) |
Import attributes data from external source
string | Type | $entityType | |
array | $attributes |
Definition at line 692 of file Config.php.
isCacheEnabled | ( | ) |
Check EAV cache availability
Definition at line 319 of file Config.php.
|
protected |
Definition at line 43 of file Config.php.
|
protected |
Definition at line 36 of file Config.php.
|
protected |
Definition at line 87 of file Config.php.
|
protected |
Definition at line 92 of file Config.php.
|
protected |
#- #-
Definition at line 29 of file Config.php.
|
protected |
Definition at line 97 of file Config.php.
|
protected |
Definition at line 82 of file Config.php.
|
protected |
Definition at line 52 of file Config.php.
|
protected |
Definition at line 75 of file Config.php.
|
protected |
Definition at line 107 of file Config.php.
|
protected |
Definition at line 102 of file Config.php.
const ATTRIBUTES_CACHE_ID = 'EAV_ENTITY_ATTRIBUTES' |
Definition at line 24 of file Config.php.
const ATTRIBUTES_CODES_CACHE_ID = 'EAV_ENTITY_ATTRIBUTES_CODES' |
Definition at line 25 of file Config.php.
const ENTITIES_CACHE_ID = 'EAV_ENTITY_TYPES' |
#+ EAV cache ids
Definition at line 23 of file Config.php.