Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-elasticsearch
Model
Adapter
BatchDataMapper
DataMapperResolver.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Elasticsearch\Model\Adapter\BatchDataMapper
;
7
8
use
Magento\Framework\Exception\NoSuchEntityException
;
9
use
Magento\Framework\Exception\ConfigurationMismatchException
;
10
use
Magento\Elasticsearch\Model\Adapter\BatchDataMapperInterface
;
11
use
Magento\Elasticsearch\Model\Config
;
12
16
class
DataMapperResolver
implements
BatchDataMapperInterface
17
{
21
private
$dataMapperEntity;
22
26
private
$dataMapperFactory;
27
31
public
function
__construct
(
DataMapperFactory
$dataMapperFactory)
32
{
33
$this->dataMapperFactory = $dataMapperFactory;
34
}
35
39
public
function
map
(array $documentData,
$storeId
, array $context = [])
40
{
41
$entityType
= isset($context[
'entityType'
]) ? $context[
'entityType'
] :
Config::ELASTICSEARCH_TYPE_DEFAULT
;
42
return
$this->getDataMapper(
$entityType
)->map($documentData,
$storeId
, $context);
43
}
44
53
private
function
getDataMapper(
$entityType
)
54
{
55
if
(!isset($this->dataMapperEntity[
$entityType
])) {
56
$this->dataMapperEntity[
$entityType
] = $this->dataMapperFactory->create(
$entityType
);
57
}
58
59
return
$this->dataMapperEntity[
$entityType
];
60
}
61
}
Magento\Elasticsearch\Model\Config
Definition:
Config.php:21
$storeId
$storeId
Definition:
customer_review_with_rating.php:14
Magento\Elasticsearch\Model\Config\ELASTICSEARCH_TYPE_DEFAULT
const ELASTICSEARCH_TYPE_DEFAULT
Definition:
Config.php:38
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
Magento\Elasticsearch\Model\Adapter\BatchDataMapper
Definition:
CategoryFieldsProvider.php:7
Magento\Elasticsearch\Model\Adapter\BatchDataMapper\DataMapperFactory
Definition:
DataMapperFactory.php:16
Magento\Elasticsearch\Model\Adapter\BatchDataMapper\DataMapperResolver\map
map(array $documentData, $storeId, array $context=[])
Definition:
DataMapperResolver.php:39
Magento\Elasticsearch\Model\Adapter\BatchDataMapper\DataMapperResolver
Definition:
DataMapperResolver.php:16
Magento\Framework\Exception\ConfigurationMismatchException
Definition:
ConfigurationMismatchException.php:13
Magento\Elasticsearch\Model\Adapter\BatchDataMapperInterface
Definition:
BatchDataMapperInterface.php:14
Magento\Elasticsearch\Model\Adapter\BatchDataMapper\DataMapperResolver\__construct
__construct(DataMapperFactory $dataMapperFactory)
Definition:
DataMapperResolver.php:31
Magento\Framework\Exception\NoSuchEntityException
Definition:
NoSuchEntityException.php:16