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
framework
GraphQl
Config
ConfigElementFactory.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Framework\GraphQl\Config
;
9
15
class
ConfigElementFactory
implements
ConfigElementFactoryInterface
16
{
20
private
$factoryMapByConfigElementType;
21
25
public
function
__construct
(
26
array $factoryMapByConfigElementType
27
) {
28
$this->factoryMapByConfigElementType = $factoryMapByConfigElementType;
29
}
30
37
public
function
createFromConfigData
(array
$data
):
ConfigElementInterface
38
{
39
if
(!isset($this->factoryMapByConfigElementType[
$data
[
'type'
]])) {
40
throw
new \LogicException(
41
sprintf(
'Factory is not configured for config element of "%s" type'
,
$data
[
'type'
])
42
);
43
}
44
return
$this->factoryMapByConfigElementType[
$data
[
'type'
]]->createFromConfigData(
$data
);
45
}
46
}
Magento\Framework\GraphQl\Config\ConfigElementFactory\createFromConfigData
createFromConfigData(array $data)
Definition:
ConfigElementFactory.php:37
Magento\Framework\GraphQl\Config\ConfigElementFactory
Definition:
ConfigElementFactory.php:15
Magento\Framework\GraphQl\Config
Definition:
ConfigElementFactory.php:8
Magento\Framework\GraphQl\Config\ConfigElementInterface
Definition:
ConfigElementInterface.php:13
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\GraphQl\Config\ConfigElementFactoryInterface
Definition:
ConfigElementFactoryInterface.php:13
Magento\Framework\GraphQl\Config\ConfigElementFactory\__construct
__construct(array $factoryMapByConfigElementType)
Definition:
ConfigElementFactory.php:25