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-config
Model
Config
Structure
Mapper
Dependencies.php
Go to the documentation of this file.
1
<?php
10
namespace
Magento\Config\Model\Config\Structure\Mapper
;
11
16
class
Dependencies
extends
\Magento\Config\Model\Config\Structure\AbstractMapper
17
{
23
protected
$_pathConverter
;
24
28
public
function
__construct
(
29
\
Magento
\
Config
\Model\
Config
\
Structure
\
Mapper
\Helper\RelativePathConverter $pathConverted
30
) {
31
$this->_pathConverter = $pathConverted;
32
}
33
40
public
function
map
(array
$data
)
41
{
42
if
($this->
_hasValue
(
'config/system/sections'
, $data)) {
43
foreach
(
$data
[
'config'
][
'system'
][
'sections'
] as &$sectionConfig) {
44
$sectionConfig = $this->
_processConfig
($sectionConfig);
45
}
46
}
47
return
$data
;
48
}
49
56
protected
function
_processConfig
(
$config
)
57
{
58
$config
= $this->
_processDepends
(
$config
);
59
60
if
($this->
_hasValue
(
'children'
,
$config
)) {
61
foreach
(
$config
[
'children'
] as &$subConfig) {
62
$subConfig = $this->
_processConfig
($subConfig);
63
}
64
}
65
return
$config
;
66
}
67
74
protected
function
_processDepends
(
$config
)
75
{
76
if
($this->
_hasValue
(
'depends/fields'
,
$config
)) {
77
foreach
(
$config
[
'depends'
][
'fields'
] as &$field) {
78
$dependPath = $this->
_getDependPath
($field,
$config
);
79
$field[
'dependPath'
] = $dependPath;
80
$field[
'id'
] = implode(
'/'
, $dependPath);
81
}
82
}
83
return
$config
;
84
}
85
94
protected
function
_getDependPath
($field,
$config
)
95
{
96
$dependPath = $field[
'id'
];
97
$elementPath =
$config
[
'path'
] .
'/'
.
$config
[
'id'
];
98
99
return
explode(
'/'
, $this->_pathConverter->convert($elementPath, $dependPath));
100
}
101
}
Magento\Config\Model\Config\Structure\Mapper\Dependencies\$_pathConverter
$_pathConverter
Definition:
Dependencies.php:23
Magento\Config\Model\Config\Structure\Mapper\Dependencies
Definition:
Dependencies.php:16
Magento\Config\Model\Config\Structure\Mapper\Dependencies\__construct
__construct(\Magento\Config\Model\Config\Structure\Mapper\Helper\RelativePathConverter $pathConverted)
Definition:
Dependencies.php:28
$config
$config
Definition:
fraud_order.php:17
Magento\Framework\DataObject\Mapper
Definition:
Mapper.php:16
Magento\Config\Model\Config\Structure\Mapper\Dependencies\_processDepends
_processDepends($config)
Definition:
Dependencies.php:74
Magento\Config\Model\Config\Structure
Definition:
Structure.php:47
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Config\Model\Config\Structure\Mapper\Dependencies\_getDependPath
_getDependPath($field, $config)
Definition:
Dependencies.php:94
Magento
Magento\Config\Model\Config\Structure\AbstractMapper\_hasValue
_hasValue($key, $target)
Definition:
AbstractMapper.php:25
Magento\Config\Model\Config\Structure\Mapper\Dependencies\_processConfig
_processConfig($config)
Definition:
Dependencies.php:56
Magento\Framework\App\Config
Definition:
Config.php:17
Magento\Config\Model\Config\Structure\Mapper\Dependencies\map
map(array $data)
Definition:
Dependencies.php:40
Magento\Config\Model\Config\Structure\Mapper