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-catalog-graph-ql
Model
CustomizableOptionTypeResolver.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\CatalogGraphQl\Model
;
9
10
use
Magento\Framework\GraphQl\Query\Resolver\TypeResolverInterface
;
11
use
Magento\Framework\GraphQl\Schema\Type\Entity\MapperInterface
;
12
16
class
CustomizableOptionTypeResolver
implements
TypeResolverInterface
17
{
18
const
ENTITY_TYPE
=
'customizable_options'
;
19
23
private
$mapper;
24
28
public
function
__construct
(
MapperInterface
$mapper)
29
{
30
$this->mapper = $mapper;
31
}
32
36
public
function
resolveType
(array
$data
) : string
37
{
38
$map
= $this->mapper->getMappedTypes(self::ENTITY_TYPE);
39
if
(isset(
$map
[
$data
[
'type'
]])) {
40
return
$map
[
$data
[
'type'
]];
41
}
42
return
''
;
43
}
44
}
Magento\Framework\GraphQl\Schema\Type\Entity\MapperInterface
Definition:
MapperInterface.php:13
$map
$map
Definition:
classmap_generator.php:167
Magento\CatalogGraphQl\Model\CustomizableOptionTypeResolver
Definition:
CustomizableOptionTypeResolver.php:16
Magento\CatalogGraphQl\Model\CustomizableOptionTypeResolver\resolveType
resolveType(array $data)
Definition:
CustomizableOptionTypeResolver.php:36
Magento\Framework\GraphQl\Query\Resolver\TypeResolverInterface
Definition:
TypeResolverInterface.php:15
Magento\CatalogGraphQl\Model\CustomizableOptionTypeResolver\__construct
__construct(MapperInterface $mapper)
Definition:
CustomizableOptionTypeResolver.php:28
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\CatalogGraphQl\Model\CustomizableOptionTypeResolver\ENTITY_TYPE
const ENTITY_TYPE
Definition:
CustomizableOptionTypeResolver.php:18
Magento\CatalogGraphQl\Model
Definition:
AttributesJoiner.php:8