25 \Magento\Config\Model\Config\Structure\Mapper\Factory::MAPPER_EXTENDS,
26 \Magento\Config\Model\Config\Structure\Mapper\Factory::MAPPER_PATH,
27 \Magento\Config\Model\Config\Structure\Mapper\Factory::MAPPER_DEPENDENCIES,
28 \Magento\Config\Model\Config\Structure\Mapper\Factory::MAPPER_ATTRIBUTE_INHERITANCE,
29 \Magento\Config\Model\Config\Structure\Mapper\Factory::MAPPER_IGNORE,
30 \Magento\Config\Model\Config\Structure\Mapper\Factory::MAPPER_SORTING,
41 'system' => [
'tab' =>
'tabs',
'section' =>
'sections'],
42 'section' => [
'group' =>
'children'],
43 'group' => [
'field' =>
'children',
'group' =>
'children'],
44 'depends' => [
'field' =>
'fields'],
52 $this->_mapperFactory = $mapperFactory;
65 foreach ($this->_mapperList as
$type) {
67 $mapper = $this->_mapperFactory->create(
$type);
82 protected function _convertDOMDocument(\DOMNode $root)
88 $processedSubLists = [];
91 $childName = $child->nodeName;
94 switch ($child->nodeType) {
95 case XML_COMMENT_NODE:
100 if (
$children->length && trim($child->nodeValue,
"\n ") ===
'') {
103 $childName =
'value';
104 $convertedChild = $child->nodeValue;
107 case XML_CDATA_SECTION_NODE:
108 $childName =
'value';
109 $convertedChild = $child->nodeValue;
114 if ($childName ==
'attribute') {
115 $childName = $child->getAttribute(
'type');
117 $convertedChild = $this->_convertDOMDocument($child);
121 if (array_key_exists(
124 ) && array_key_exists(
126 $this->_nameMap[$root->nodeName]
129 $childName = $this->_nameMap[$root->nodeName][$child->nodeName];
130 $processedSubLists[] = $childName;
131 $convertedChild[
'_elementType'] = $child->nodeName;
134 if (in_array($childName, $processedSubLists)) {
138 $processedSubLists[] = $childName;
140 $result[$childName] = $convertedChild;
164 if (is_array($convertedChild) && array_key_exists(
'id', $convertedChild)) {
165 $result[$childName][$convertedChild[
'id']] = $convertedChild;
167 $result[$childName][] = $convertedChild;
182 if ($root->hasAttributes()) {
185 if ($root->nodeName ==
'attribute' &&
$attribute->name ==
'type') {
_addProcessedNode($convertedChild, $result, $childName)
elseif(isset( $params[ 'redirect_parent']))
__construct(\Magento\Config\Model\Config\Structure\Mapper\Factory $mapperFactory)
_processAttributes(\DOMNode $root)