Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Weight.php
Go to the documentation of this file.
1 <?php
7 
14 {
21  protected $weights = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
22 
28  public function getOptions()
29  {
30  $res = [];
31  foreach ($this->getValues() as $value) {
32  $res[] = ['value' => $value, 'label' => $value];
33  }
34  return $res;
35  }
36 
42  public function getValues()
43  {
44  return $this->weights;
45  }
46 
53  public function toOptionArray()
54  {
55  return $this->getOptions();
56  }
57 }
$value
Definition: gender.phtml:16