Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All.php
Go to the documentation of this file.
1 <?php
7 
13 {
17  protected $_options;
18 
22  protected $_localeLists;
23 
27  public function __construct(\Magento\Framework\Locale\ListsInterface $localeLists)
28  {
29  $this->_localeLists = $localeLists;
30  }
31 
36  public function toOptionArray($isMultiselect = false)
37  {
38  if (!$this->_options) {
39  $this->_options = $this->_localeLists->getOptionAllCurrencies();
40  }
42  if (!$isMultiselect) {
43  array_unshift($options, ['value' => '', 'label' => '']);
44  }
45 
46  return $options;
47  }
48 }
__construct(\Magento\Framework\Locale\ListsInterface $localeLists)
Definition: All.php:27