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
Config
Source
Page.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Cms\Model\Config\Source
;
7
8
use Magento\Cms\Model\ResourceModel\Page\CollectionFactory;
9
13
class
Page
implements
\Magento\Framework\Option\ArrayInterface
14
{
18
protected
$options
;
19
23
protected
$collectionFactory
;
24
28
public
function
__construct
(
29
CollectionFactory
$collectionFactory
30
) {
31
$this->collectionFactory =
$collectionFactory
;
32
}
33
39
public
function
toOptionArray
()
40
{
41
if
(!$this->options) {
42
$this->options = $this->collectionFactory->create()->toOptionIdArray();
43
}
44
return
$this->options
;
45
}
46
}
Magento\Cms\Model\Config\Source
Definition:
Block.php:8
Magento\Cms\Model\Config\Source\Page
Definition:
Page.php:13
Magento\Framework\Option\ArrayInterface
Definition:
ArrayInterface.php:11
Magento\Cms\Model\Config\Source\Page\__construct
__construct(CollectionFactory $collectionFactory)
Definition:
Page.php:28
Magento\Cms\Model\Config\Source\Page\toOptionArray
toOptionArray()
Definition:
Page.php:39
Magento\Cms\Model\Config\Source\Page\$collectionFactory
$collectionFactory
Definition:
Page.php:23
Magento\Cms\Model\Config\Source\Page\$options
$options
Definition:
Page.php:18