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
framework
View
PageLayout
Config.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\View\PageLayout
;
8
12
class
Config
extends
\Magento\Framework\Config\AbstractXml
13
{
17
protected
$urnResolver
;
18
27
public
function
__construct
(
28
$configFiles,
29
\
Magento
\Framework\
Config
\DomFactory
$domFactory
,
30
\
Magento
\Framework\
Config
\Dom\UrnResolver
$urnResolver
31
) {
32
$this->urnResolver =
$urnResolver
;
33
parent::__construct($configFiles,
$domFactory
);
34
}
35
41
public
function
getSchemaFile
()
42
{
43
return
$this->urnResolver->getRealPath(
'urn:magento:framework:View/PageLayout/etc/layouts.xsd'
);
44
}
45
51
public
function
getPageLayouts
()
52
{
53
return
$this->_data
;
54
}
55
62
public
function
hasPageLayout
($pageLayout)
63
{
64
return
isset($this->_data[$pageLayout]);
65
}
66
72
public
function
getOptions
()
73
{
74
return
$this->
getPageLayouts
();
75
}
76
81
public
function
toOptionArray
($withEmpty =
false
)
82
{
83
$options
= [];
84
foreach
($this->
getPageLayouts
() as
$value
=>
$label
) {
85
$options
[] = [
'label'
=>
$label
,
'value'
=>
$value
];
86
}
87
88
if
($withEmpty) {
89
array_unshift(
$options
, [
90
'value'
=>
''
,
91
'label'
=> (
string
)
new
\
Magento
\Framework\
Phrase
(
'-- Please Select --'
)
92
]);
93
}
94
return
$options
;
95
}
96
103
protected
function
_extractData
(\DOMDocument $dom)
104
{
105
$result
= [];
106
108
foreach
($dom->getElementsByTagName(
'layout'
) as $layout) {
109
$result
[$layout->getAttribute(
'id'
)] = trim($layout->nodeValue);
110
}
111
return
$result
;
112
}
113
119
protected
function
_getInitialXml
()
120
{
121
return
'<?xml version="1.0" encoding="UTF-8"?>'
122
.
'<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></page_layouts>'
;
123
}
124
130
protected
function
_getIdAttributes
()
131
{
132
return
[
133
'/page_layouts/layout'
=>
'id'
134
];
135
}
136
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\View\PageLayout\Config\_getInitialXml
_getInitialXml()
Definition:
Config.php:119
Magento\Framework\View\PageLayout\Config\$urnResolver
$urnResolver
Definition:
Config.php:17
Magento\Framework\View\PageLayout\Config\hasPageLayout
hasPageLayout($pageLayout)
Definition:
Config.php:62
Magento\Framework\Config\AbstractXml\$_data
$_data
Definition:
AbstractXml.php:23
Magento\Framework\View\PageLayout\Config\toOptionArray
toOptionArray($withEmpty=false)
Definition:
Config.php:81
Magento\Framework\Config\AbstractXml\_extractData
_extractData(\DOMDocument $dom)
Magento\Framework\View\PageLayout\Config\getSchemaFile
getSchemaFile()
Definition:
Config.php:41
Magento\Framework\View\PageLayout\Config
Definition:
Config.php:12
Magento\Framework\Config\AbstractXml
Definition:
AbstractXml.php:16
Magento\Framework\View\PageLayout\Config\getOptions
getOptions()
Definition:
Config.php:72
$label
$label
Definition:
details.phtml:21
$value
$value
Definition:
gender.phtml:16
Magento\Framework\View\PageLayout\Config\getPageLayouts
getPageLayouts()
Definition:
Config.php:51
Magento
Magento\Framework\Config\AbstractXml\$domFactory
$domFactory
Definition:
AbstractXml.php:34
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\View\PageLayout\Config\__construct
__construct( $configFiles, \Magento\Framework\Config\DomFactory $domFactory, \Magento\Framework\Config\Dom\UrnResolver $urnResolver)
Definition:
Config.php:27
Magento\Framework\View\PageLayout\Config\_getIdAttributes
_getIdAttributes()
Definition:
Config.php:130
Magento\Framework\View\PageLayout
Definition:
Config.php:7
$options
$options
Definition:
multiple_mixed_products.php:29