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-theme
Model
Layout
Config
Converter.php
Go to the documentation of this file.
1
<?php
8
namespace
Magento\Theme\Model\Layout\Config
;
9
10
class
Converter
implements
\Magento\Framework\Config\ConverterInterface
11
{
15
public
function
convert
(
$source
)
16
{
17
$pageLayouts = [];
18
$xpath = new \DOMXPath(
$source
);
19
21
foreach
($xpath->query(
'/page_layouts/layout'
) as $layout) {
22
$layoutAttributes = $layout->attributes;
23
$id
= $layoutAttributes->getNamedItem(
'id'
)->nodeValue;
24
$pageLayouts[
$id
][
'code'
] =
$id
;
25
27
foreach
($layout->childNodes as $layoutSubNode) {
28
switch
($layoutSubNode->nodeName) {
29
case
'label'
:
30
$pageLayouts[
$id
][$layoutSubNode->nodeName] = $layoutSubNode->nodeValue;
31
break
;
32
default
:
33
break
;
34
}
35
}
36
}
37
return
$pageLayouts;
38
}
39
}
$id
$id
Definition:
fieldset.phtml:14
$source
$source
Definition:
source.php:23
Magento\Framework\Config\ConverterInterface\convert
convert($source)
Magento\Theme\Model\Layout\Config\Converter
Definition:
Converter.php:10
Magento\Theme\Model\Layout\Config
Definition:
ReaderTest.php:8
Magento\Framework\Config\ConverterInterface
Definition:
ConverterInterface.php:14