Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
IsActive.php
Go to the documentation of this file.
1 <?php
7 
9 
14 {
18  protected $cmsPage;
19 
25  public function __construct(\Magento\Cms\Model\Page $cmsPage)
26  {
27  $this->cmsPage = $cmsPage;
28  }
29 
35  public function toOptionArray()
36  {
37  $availableOptions = $this->cmsPage->getAvailableStatuses();
38  $options = [];
39  foreach ($availableOptions as $key => $value) {
40  $options[] = [
41  'label' => $value,
42  'value' => $key,
43  ];
44  }
45  return $options;
46  }
47 }
__construct(\Magento\Cms\Model\Page $cmsPage)
Definition: IsActive.php:25
$value
Definition: gender.phtml:16