Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Unitofmeasure.php
Go to the documentation of this file.
1 <?php
7 
12 {
18  protected $_code = 'unit_of_measure';
19 
24  public function toOptionArray()
25  {
26  $unitArr = $this->carrierConfig->getCode($this->_code);
27  $returnArr = [];
28  foreach ($unitArr as $key => $val) {
29  $returnArr[] = ['value' => $key, 'label' => $key];
30  }
31  return $returnArr;
32  }
33 }