Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (ModuleDataSetupInterface $setup, Context $context, CacheInterface $cache, CollectionFactory $attrGroupCollectionFactory, ScopeConfigInterface $config) | |
addAttribute ($entityTypeId, $code, array $attr) | |
getDefaultEntities () | |
getConfigModel () | |
getEncryptor () | |
getConnection () | |
getTable ($table) | |
updateEntityTypes () | |
![]() | |
__construct (ModuleDataSetupInterface $setup, Context $context, CacheInterface $cache, CollectionFactory $attrGroupCollectionFactory) | |
getSetup () | |
getAttributeGroupCollectionFactory () | |
cleanCache () | |
installDefaultGroupIds () | |
addEntityType ($code, array $params) | |
updateEntityType ($code, $field, $value=null) | |
getEntityType ($id, $field=null) | |
getEntityTypeId ($entityTypeId) | |
removeEntityType ($id) | |
getAttributeSetSortOrder ($entityTypeId, $sortOrder=null) | |
addAttributeSet ($entityTypeId, $name, $sortOrder=null, $setId=null) | |
updateAttributeSet ($entityTypeId, $id, $field, $value=null) | |
getAttributeSet ($entityTypeId, $id, $field=null) | |
getAttributeSetId ($entityTypeId, $setId) | |
removeAttributeSet ($entityTypeId, $id) | |
setDefaultSetToEntityType ($entityType, $attributeSet='Default') | |
getAllAttributeSetIds ($entityTypeId=null) | |
getDefaultAttributeSetId ($entityType) | |
getAttributeGroupSortOrder ($entityTypeId, $setId, $sortOrder=null) | |
addAttributeGroup ($entityTypeId, $setId, $name, $sortOrder=null) | |
convertToAttributeGroupCode ($groupName) | |
updateAttributeGroup ($entityTypeId, $setId, $id, $field, $value=null) | |
getAttributeGroup ($entityTypeId, $setId, $id, $field=null) | |
getAttributeGroupByCode ($entityTypeId, $setId, $code, $field=null) | |
getAttributeGroupId ($entityTypeId, $setId, $groupId) | |
removeAttributeGroup ($entityTypeId, $setId, $id) | |
getDefaultAttributeGroupId ($entityType, $attributeSetId=null) | |
getAttributesNumberInGroup ($entityTypeId, $setId, $groupId) | |
addAttribute ($entityTypeId, $code, array $attr) | |
addAttributeOption ($option) | |
updateAttribute ($entityTypeId, $id, $field, $value=null, $sortOrder=null) | |
getAttribute ($entityTypeId, $id, $field=null) | |
getAttributeId ($entityTypeId, $id) | |
getAttributeTable ($entityTypeId, $id) | |
removeAttribute ($entityTypeId, $code) | |
getAttributeSortOrder ($entityTypeId, $setId, $groupId, $sortOrder=null) | |
addAttributeToSet ($entityTypeId, $setId, $groupId, $attributeId, $sortOrder=null) | |
addAttributeToGroup ($entityType, $setId, $groupId, $attributeId, $sortOrder=null) | |
getDefaultEntities () | |
installEntities ($entities=null) | |
Data Fields | |
const | ORDER_ENTITY_TYPE_ID = 5 |
const | INVOICE_PRODUCT_ENTITY_TYPE_ID = 6 |
const | CREDITMEMO_PRODUCT_ENTITY_TYPE_ID = 7 |
const | SHIPMENT_PRODUCT_ENTITY_TYPE_ID = 8 |
Protected Member Functions | |
_flatTableExist ($table) | |
_addFlatAttribute ($table, $attribute, $attr) | |
_addGridAttribute ($table, $attribute, $attr, $entityTypeId) | |
_getAttributeColumnDefinition ($code, $data) | |
Protected Attributes | |
$config | |
$encryptor | |
$_flatEntityTables | |
$_flatEntitiesGrid = ['order', 'invoice', 'shipment', 'creditmemo'] | |
Sales module setup class
@SuppressWarnings(PHPMD.CouplingBetweenObjects) @codeCoverageIgnore
Definition at line 23 of file SalesSetup.php.
__construct | ( | ModuleDataSetupInterface | $setup, |
Context | $context, | ||
CacheInterface | $cache, | ||
CollectionFactory | $attrGroupCollectionFactory, | ||
ScopeConfigInterface | $config | ||
) |
Constructor
ModuleDataSetupInterface | $setup | |
Context | $context | |
CacheInterface | $cache | |
CollectionFactory | $attrGroupCollectionFactory | |
ScopeConfigInterface | $config |
Definition at line 69 of file SalesSetup.php.
|
protected |
Add attribute as separate column in the table
string | $table | |
string | $attribute | |
array | $attr |
Definition at line 159 of file SalesSetup.php.
|
protected |
Add attribute to grid table if necessary
string | $table | |
string | $attribute | |
array | $attr | |
string | $entityTypeId |
Definition at line 184 of file SalesSetup.php.
|
protected |
Check if table exist for flat entity
string | $table |
Definition at line 117 of file SalesSetup.php.
|
protected |
Retrieve definition of column for create in flat table
string | $code | |
array | $data |
Definition at line 206 of file SalesSetup.php.
addAttribute | ( | $entityTypeId, | |
$code, | |||
array | $attr | ||
) |
Add entity attribute. Overwritten for flat entities support
int | string | $entityTypeId | |
string | $code | |
array | $attr |
Definition at line 135 of file SalesSetup.php.
getConfigModel | ( | ) |
getConnection | ( | ) |
Definition at line 309 of file SalesSetup.php.
getDefaultEntities | ( | ) |
Definition at line 249 of file SalesSetup.php.
getEncryptor | ( | ) |
getTable | ( | $table | ) |
updateEntityTypes | ( | ) |
Update entity types
Definition at line 330 of file SalesSetup.php.
|
protected |
Definition at line 109 of file SalesSetup.php.
|
protected |
Definition at line 86 of file SalesSetup.php.
|
protected |
Definition at line 48 of file SalesSetup.php.
|
protected |
Definition at line 53 of file SalesSetup.php.
const CREDITMEMO_PRODUCT_ENTITY_TYPE_ID = 7 |
This should be set explicitly
Definition at line 38 of file SalesSetup.php.
const INVOICE_PRODUCT_ENTITY_TYPE_ID = 6 |
This should be set explicitly
Definition at line 33 of file SalesSetup.php.
const ORDER_ENTITY_TYPE_ID = 5 |
This should be set explicitly
Definition at line 28 of file SalesSetup.php.
const SHIPMENT_PRODUCT_ENTITY_TYPE_ID = 8 |
This should be set explicitly
Definition at line 43 of file SalesSetup.php.