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
FormatterComposite.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
;
9
10
use
Magento\Framework\GraphQl\Config\Element\TypeInterface
;
11
use
Magento\Framework\GraphQl\Schema\Type\OutputTypeInterface
;
12
16
class
FormatterComposite
implements
FormatterInterface
17
{
21
private
$formatters;
22
26
public
function
__construct
(array $formatters)
27
{
28
$this->formatters = $formatters;
29
}
30
34
public
function
format
(
TypeInterface
$configElement,
OutputTypeInterface
$outputType) : array
35
{
36
$config
= [
37
'name'
=> $configElement->
getName
(),
38
'description'
=> $configElement->
getDescription
()
39
];
40
foreach
($this->formatters as $formatter) {
41
$config
= array_merge(
$config
, $formatter->format($configElement, $outputType));
42
}
43
44
return
$config
;
45
}
46
}
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\FormatterComposite
Definition:
FormatterComposite.php:16
$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\FormatterComposite\__construct
__construct(array $formatters)
Definition:
FormatterComposite.php:26
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper\FormatterComposite\format
format(TypeInterface $configElement, OutputTypeInterface $outputType)
Definition:
FormatterComposite.php:34
Magento\Framework\GraphQl\Config\ConfigElementInterface\getName
getName()
Magento\Framework\GraphQl\Schema\Type\Output\ElementMapper
Magento\Framework\GraphQl\Config\Element\TypeInterface
Definition:
TypeInterface.php:15
Magento\Framework\GraphQl\Config\ConfigElementInterface\getDescription
getDescription()
Magento\Framework\GraphQl\Schema\Type\OutputTypeInterface
Definition:
OutputTypeInterface.php:15