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
Schema
Type
Output
ElementMapper
Formatter
Interfaces.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\Formatter
;
9
10
use
Magento\Framework\GraphQl\Config\Element\Type
;
11
use
Magento\Framework\GraphQl\Config\Element\TypeInterface
;
12
use
Magento\Framework\GraphQl\Schema\Type\OutputTypeInterface
;
13
use
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\FormatterInterface
;
14
use
Magento\Framework\GraphQl\Schema\Type\Output\OutputMapper
;
15
19
class
Interfaces
implements
FormatterInterface
20
{
24
private
$outputMapper;
25
29
public
function
__construct
(
OutputMapper
$outputMapper)
30
{
31
$this->outputMapper = $outputMapper;
32
}
33
37
public
function
format
(
TypeInterface
$configElement,
OutputTypeInterface
$outputType) : array
38
{
39
$config
= [];
40
if
($configElement instanceof
Type
&& !empty($configElement->getInterfaces())) {
41
$interfaces = [];
42
foreach
($configElement->getInterfaces() as $interface) {
43
$interfaces[$interface[
'interface'
]] = $this->outputMapper->getOutputType($interface[
'interface'
]);
44
}
45
$config
[
'interfaces'
] = $interfaces;
46
}
47
48
return
$config
;
49
}
50
}
$config
$config
Definition:
fraud_order.php:17
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\FormatterInterface
Definition:
FormatterInterface.php:16
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\Formatter\Interfaces\__construct
__construct(OutputMapper $outputMapper)
Definition:
Interfaces.php:29
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\Formatter\Interfaces\format
format(TypeInterface $configElement, OutputTypeInterface $outputType)
Definition:
Interfaces.php:37
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\Formatter\Interfaces
Definition:
Interfaces.php:19
Magento\Framework\GraphQl\Config\Element\Type
Definition:
Type.php:13
Magento\Framework\GraphQl\Config\Element\TypeInterface
Definition:
TypeInterface.php:15
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\Formatter
Definition:
Fields.php:8
Magento\Framework\GraphQl\Schema\Type\OutputTypeInterface
Definition:
OutputTypeInterface.php:15
Magento\Framework\GraphQl\Schema\Type\Output\OutputMapper
Definition:
OutputMapper.php:19