Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Eav\Model\Config $config, \Magento\Framework\App\ResourceConnection $resource, \Magento\Store\Model\StoreManagerInterface $storeManager, \Psr\Log\LoggerInterface $logger, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $collectionFactory, \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig, \Magento\Catalog\Model\ResourceModel\ProductFactory $productFactory, \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $attrSetColFactory, \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryColFactory, \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory $itemFactory, \Magento\Catalog\Model\ResourceModel\Product\Option\CollectionFactory $optionColFactory, \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeColFactory, \Magento\CatalogImportExport\Model\Export\Product\Type\Factory $_typeFactory, \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider, \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer, array $dateAttrCodes=[]) | |
_getHeaderColumns () | |
export () | |
filterAttributeCollection (\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection $collection) | |
getAttributeCollection () | |
getEntityTypeCode () | |
![]() | |
__construct (\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Eav\Model\Config $config, ResourceConnection $resource, \Magento\Store\Model\StoreManagerInterface $storeManager) | |
addRowError ($errorCode, $errorRowNum) | |
addMessageTemplate ($errorCode, $message) | |
retrieveMessageTemplate ($errorCode) | |
export () | |
filterAttributeCollection (\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection $collection) | |
getAttributeCollection () | |
getAttributeOptions (\Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute) | |
getEntityTypeCode () | |
getEntityTypeId () | |
getErrorMessages () | |
getErrorsCount () | |
getInvalidRowsCount () | |
getProcessedEntitiesCount () | |
getProcessedRowsCount () | |
getWriter () | |
setParameters (array $parameters) | |
setWriter (AbstractAdapter $writer) | |
__destruct () | |
Data Fields | |
const | VALUE_ALL = 'all' |
const | COL_STORE = '_store' |
const | COL_ATTR_SET = '_attribute_set' |
const | COL_TYPE = '_type' |
const | COL_PRODUCT_WEBSITES = '_product_websites' |
const | COL_CATEGORY = '_category' |
const | COL_ROOT_CATEGORY = '_root_category' |
const | COL_SKU = 'sku' |
const | COL_VISIBILITY = 'visibility' |
const | COL_MEDIA_IMAGE = '_media_image' |
const | COL_ADDITIONAL_ATTRIBUTES = 'additional_attributes' |
Additional Inherited Members | |
![]() | |
static | $attrCodes = null |
Export entity product model
@api
@SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.ExcessiveClassComplexity) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 25 of file Product.php.
__construct | ( | \Magento\Framework\Stdlib\DateTime\TimezoneInterface | $localeDate, |
\Magento\Eav\Model\Config | $config, | ||
\Magento\Framework\App\ResourceConnection | $resource, | ||
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Psr\Log\LoggerInterface | $logger, | ||
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory | $collectionFactory, | ||
\Magento\ImportExport\Model\Export\ConfigInterface | $exportConfig, | ||
\Magento\Catalog\Model\ResourceModel\ProductFactory | $productFactory, | ||
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory | $attrSetColFactory, | ||
\Magento\Catalog\Model\ResourceModel\Category\CollectionFactory | $categoryColFactory, | ||
\Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory | $itemFactory, | ||
\Magento\Catalog\Model\ResourceModel\Product\Option\CollectionFactory | $optionColFactory, | ||
\Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory | $attributeColFactory, | ||
\Magento\CatalogImportExport\Model\Export\Product\Type\Factory | $_typeFactory, | ||
\Magento\Catalog\Model\Product\LinkTypeProvider | $linkTypeProvider, | ||
\Magento\CatalogImportExport\Model\Export\RowCustomizerInterface | $rowCustomizer, | ||
array | $dateAttrCodes = [] |
||
) |
\Magento\Framework\Stdlib\DateTime\TimezoneInterface | $localeDate | |
\Magento\Eav\Model\Config | $config | |
\Magento\Framework\App\ResourceConnection | $resource | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Psr\Log\LoggerInterface | $logger | |
\Magento\Catalog\Model\ResourceModel\Product\Collection | $collection | |
\Magento\ImportExport\Model\Export\ConfigInterface | $exportConfig | |
\Magento\Catalog\Model\ResourceModel\ProductFactory | $productFactory | |
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory | $attrSetColFactory | |
\Magento\Catalog\Model\ResourceModel\Category\CollectionFactory | $categoryColFactory | |
\Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory | $itemFactory | |
\Magento\Catalog\Model\ResourceModel\Product\Option\CollectionFactory | $optionColFactory | |
\Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory | $attributeColFactory | |
Product\Type\Factory | $_typeFactory | |
\Magento\Catalog\Model\Product\LinkTypeProvider | $linkTypeProvider | |
\Magento\CatalogImportExport\Model\Export\RowCustomizerInterface | $rowCustomizer | |
array | $dateAttrCodes | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 371 of file Product.php.
|
protected |
Custom fields mapping for changed purposes of fields and field names
array | $rowData |
Definition at line 1310 of file Product.php.
|
protected |
Custom headers mapping for changed field names
array | $rowData |
Definition at line 1328 of file Product.php.
|
protected |
|
protected |
Get attributes codes which are appropriate for export and not the part of additional_attributes.
Definition at line 748 of file Product.php.
_getHeaderColumns | ( | ) |
{}
Definition at line 697 of file Product.php.
|
protected |
{}
Definition at line 864 of file Product.php.
|
protected |
array | $dataRow | |
array | $multiRawData |
Definition at line 1297 of file Product.php.
|
protected |
\Magento\Catalog\Model\Product | $item | |
string | $attrCode | |
int | $storeId |
Definition at line 1125 of file Product.php.
export | ( | ) |
Export process
Definition at line 829 of file Product.php.
filterAttributeCollection | ( | \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection | $collection | ) |
Clean up already loaded attribute collection.
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection | $collection |
Definition at line 1431 of file Product.php.
getAttributeCollection | ( | ) |
Entity attributes collection getter.
Definition at line 1465 of file Product.php.
|
protected |
Collect custom options data for products that will be exported.
Option name and type will be collected for all store views, all other data (which can't be changed on store view level will be collected for DEFAULT_STORE_ID only. Store view specified data will be saved to the additional store view row.
int[] | $productIds |
Definition at line 1365 of file Product.php.
getEntityTypeCode | ( | ) |
|
protected |
Get export data for collection
Definition at line 888 of file Product.php.
|
protected |
Get items per page
Definition at line 769 of file Product.php.
|
protected |
Prepare products media gallery
int[] | $productIds |
Definition at line 518 of file Product.php.
|
protected |
Get product entity link field
Definition at line 1518 of file Product.php.
|
protected |
\Magento\Catalog\Model\Product | $item | |
int | $storeId |
Definition at line 1113 of file Product.php.
|
protected |
Initialize attribute option values and types.
Definition at line 1485 of file Product.php.
|
protected |
Initialize attribute sets code-to-id pairs.
Definition at line 420 of file Product.php.
|
protected |
Initialize categories ID to text-path hash.
Definition at line 434 of file Product.php.
|
protected |
Initialize product type models.
Definition at line 462 of file Product.php.
|
protected |
|
protected |
Load products' data from the collection and filter it (if needed).
Definition at line 930 of file Product.php.
|
protected |
array | $option |
Definition at line 1342 of file Product.php.
|
protected |
Set page and page size to collection
int | $page | |
int | $pageSize |
Definition at line 819 of file Product.php.
|
protected |
Prepare catalog inventory
int[] | $productIds |
Definition at line 572 of file Product.php.
|
protected |
Prepare product links
int[] | $productIds |
Definition at line 606 of file Product.php.
|
protected |
Set headers columns
array | $customOptionsData | |
array | $stockItemRows |
@SuppressWarnings(PHPMD.UnusedFormalParameter)
Definition at line 712 of file Product.php.
|
protected |
Update data row with information about categories. Return true, if data row was updated
array | &$dataRow | |
array | &$rowCategories | |
int | $productId |
Definition at line 675 of file Product.php.
|
protected |
Definition at line 214 of file Product.php.
|
protected |
Definition at line 133 of file Product.php.
|
protected |
Definition at line 189 of file Product.php.
|
protected |
Definition at line 70 of file Product.php.
|
protected |
Definition at line 32 of file Product.php.
|
protected |
Definition at line 77 of file Product.php.
|
protected |
Definition at line 194 of file Product.php.
|
protected |
Definition at line 154 of file Product.php.
|
protected |
Definition at line 147 of file Product.php.
|
protected |
Definition at line 174 of file Product.php.
|
protected |
Definition at line 288 of file Product.php.
|
protected |
Definition at line 238 of file Product.php.
|
protected |
Definition at line 169 of file Product.php.
|
protected |
Definition at line 91 of file Product.php.
|
protected |
Definition at line 204 of file Product.php.
|
protected |
Definition at line 161 of file Product.php.
|
protected |
Definition at line 226 of file Product.php.
|
protected |
Definition at line 179 of file Product.php.
|
protected |
Definition at line 209 of file Product.php.
|
protected |
Definition at line 105 of file Product.php.
|
protected |
Definition at line 184 of file Product.php.
|
protected |
Definition at line 112 of file Product.php.
|
protected |
Definition at line 199 of file Product.php.
|
protected |
Definition at line 84 of file Product.php.
|
protected |
Definition at line 119 of file Product.php.
|
protected |
Definition at line 219 of file Product.php.
|
protected |
Definition at line 126 of file Product.php.
|
protected |
Definition at line 98 of file Product.php.
|
protected |
Definition at line 274 of file Product.php.
|
protected |
Definition at line 342 of file Product.php.
|
protected |
Definition at line 231 of file Product.php.
const COL_ADDITIONAL_ATTRIBUTES = 'additional_attributes' |
Definition at line 63 of file Product.php.
const COL_ATTR_SET = '_attribute_set' |
Definition at line 47 of file Product.php.
const COL_CATEGORY = '_category' |
Definition at line 53 of file Product.php.
const COL_MEDIA_IMAGE = '_media_image' |
Definition at line 61 of file Product.php.
const COL_PRODUCT_WEBSITES = '_product_websites' |
Definition at line 51 of file Product.php.
const COL_ROOT_CATEGORY = '_root_category' |
Definition at line 55 of file Product.php.
const COL_SKU = 'sku' |
Definition at line 57 of file Product.php.
const COL_STORE = '_store' |
Permanent column names.
Names that begins with underscore is not an attribute. This name convention is for to avoid interference with same attribute name.
Definition at line 45 of file Product.php.
const COL_TYPE = '_type' |
Definition at line 49 of file Product.php.
const COL_VISIBILITY = 'visibility' |
Definition at line 59 of file Product.php.
const VALUE_ALL = 'all' |
Value that means all entities (e.g. websites, groups etc.)
Definition at line 37 of file Product.php.