16 class ExtendsMapper extends \Magento\Config\Model\Config\Structure\AbstractMapper
45 $this->_pathConverter = $pathConverted;
56 if (!isset(
$data[
'config'][
'system'][
'sections']) || !is_array(
$data[
'config'][
'system'][
'sections'])) {
60 $this->_systemConfiguration = &
$data[
'config'][
'system'][
'sections'];
62 foreach (array_keys($this->_systemConfiguration) as $nodeName) {
79 if (!is_array($node)) {
83 if (!empty($node[
'extends'])) {
87 if (!empty($node[
'children'])) {
88 foreach (array_keys($node[
'children']) as $childName) {
105 foreach ($pathParts as $part) {
127 if (in_array(
$path, $this->_extendedNodesList)) {
128 return $currentNodeData;
131 $extendSourcePath = $this->_pathConverter->convert(
$path, $extendSourceNode);
135 throw new \InvalidArgumentException(
136 sprintf(
'Invalid path in extends attribute of config/system/sections/%s node',
$path)
140 if (isset(
$data[
'extends'])) {
147 $this->_extendedNodesList[] =
$path;
149 return $resultingData;
162 foreach ($arr2 as $key =>
$value) {
163 if (isset($arr1[$key]) && is_array($arr1[$key]) && is_array(
$value)) {
185 foreach ($pathParts as $part) {
203 $path = str_replace(
'/',
'/children/',
$path);
204 return explode(
'/',
$path);
__construct(\Magento\Config\Model\Config\Structure\Mapper\Helper\RelativePathConverter $pathConverted)
_extendNode($path, $extendSourceNode)
_replaceData($path, $newData)
_transformPathToKeysList($path)
_traverseAndExtend($path)