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
FieldMapper
Product
CompositeFieldProvider.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product
;
9
13
class
CompositeFieldProvider
implements
FieldProviderInterface
14
{
18
private
$providers;
19
23
public
function
__construct
(array $providers)
24
{
25
foreach
($providers as $provider) {
26
if
(!$provider instanceof
FieldProviderInterface
) {
27
throw
new \InvalidArgumentException(
28
sprintf(
'Instance of the field provider is expected, got %s instead.'
, get_class($provider))
29
);
30
}
31
}
32
$this->providers = $providers;
33
}
34
41
public
function
getFields
(array $context = []): array
42
{
43
$allAttributes = [];
44
45
foreach
($this->providers as $provider) {
46
$allAttributes = array_merge($allAttributes, $provider->getFields($context));
47
}
48
49
return
$allAttributes;
50
}
51
}
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\CompositeFieldProvider\__construct
__construct(array $providers)
Definition:
CompositeFieldProvider.php:23
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\CompositeFieldProvider\getFields
getFields(array $context=[])
Definition:
CompositeFieldProvider.php:41
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProviderInterface
Definition:
FieldProviderInterface.php:14
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\CompositeFieldProvider
Definition:
CompositeFieldProvider.php:13
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product