Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
LayoutList.php
Go to the documentation of this file.
1 <?php
7 declare(strict_types=1);
8 
10 
12 
17 {
21  private $options;
22 
26  private $layoutSource;
27 
31  public function __construct(
32  Layout $layoutSource
33  ) {
34  $this->layoutSource = $layoutSource;
35  }
36 
42  public function toOptionArray()
43  {
44  if (!$this->options) {
45  $this->options = $this->layoutSource->getAllOptions();
46  }
47  return $this->options;
48  }
49 }