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-cms
Model
Page
Source
PageLayout.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Cms\Model\Page\Source
;
7
8
use
Magento\Framework\Data\OptionSourceInterface
;
9
use
Magento\Framework\View\Model\PageLayout\Config\BuilderInterface
;
10
14
class
PageLayout
implements
OptionSourceInterface
15
{
19
protected
$pageLayoutBuilder
;
20
24
protected
$options
;
25
31
public
function
__construct
(
BuilderInterface
$pageLayoutBuilder
)
32
{
33
$this->pageLayoutBuilder =
$pageLayoutBuilder
;
34
}
35
41
public
function
toOptionArray
()
42
{
43
if
($this->options !==
null
) {
44
return
$this->options
;
45
}
46
47
$configOptions = $this->pageLayoutBuilder->getPageLayoutsConfig()->getOptions();
48
$options
= [];
49
foreach
($configOptions as $key =>
$value
) {
50
$options
[] = [
51
'label'
=>
$value
,
52
'value'
=> $key,
53
];
54
}
55
$this->options =
$options
;
56
57
return
$this->options
;
58
}
59
}
Magento\Cms\Model\Page\Source\PageLayout\toOptionArray
toOptionArray()
Definition:
PageLayout.php:41
Magento\Cms\Model\Page\Source\PageLayout\__construct
__construct(BuilderInterface $pageLayoutBuilder)
Definition:
PageLayout.php:31
Magento\Framework\View\Model\PageLayout\Config\BuilderInterface
Definition:
BuilderInterface.php:11
Magento\Cms\Model\Page\Source\PageLayout\$options
$options
Definition:
PageLayout.php:24
$value
$value
Definition:
gender.phtml:16
Magento\Cms\Model\Page\Source\PageLayout\$pageLayoutBuilder
$pageLayoutBuilder
Definition:
PageLayout.php:19
Magento\Framework\Data\OptionSourceInterface
Definition:
OptionSourceInterface.php:14
Magento\Cms\Model\Page\Source
Definition:
CustomLayout.php:6
Magento\Cms\Model\Page\Source\PageLayout
Definition:
PageLayout.php:14