Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PageLayout.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  protected $pageLayoutBuilder;
20 
24  protected $options;
25 
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 }
__construct(BuilderInterface $pageLayoutBuilder)
Definition: PageLayout.php:31
$value
Definition: gender.phtml:16