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
Resolver
Products
DataProvider
CustomAttributesFlattener.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider
;
9
13
class
CustomAttributesFlattener
14
{
21
public
function
flatten
(array $categoryData) : array
22
{
23
if
(!isset($categoryData[
'custom_attributes'
])) {
24
return
$categoryData;
25
}
26
27
foreach
($categoryData[
'custom_attributes'
] as
$attributeData
) {
28
$categoryData[
$attributeData
[
'attribute_code'
]] =
$attributeData
[
'value'
];
29
}
30
31
unset($categoryData[
'custom_attributes'
]);
32
33
return
$categoryData;
34
}
35
}
Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\CustomAttributesFlattener\flatten
flatten(array $categoryData)
Definition:
CustomAttributesFlattener.php:21
Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider
Definition:
CategoryTree.php:8
Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\CustomAttributesFlattener
Definition:
CustomAttributesFlattener.php:13
$attributeData
$attributeData
Definition:
attribute_set_with_image_attribute.php:28