Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
GridPerPage.php
Go to the documentation of this file.
1 <?php
7 
14 {
20  protected $_options;
21 
27  public function __construct($perPageValues)
28  {
29  $this->_options = explode(',', $perPageValues);
30  }
31 
35  public function toOptionArray()
36  {
37  $result = [];
38  foreach ($this->_options as $option) {
39  $result[] = ['value' => $option, 'label' => $option];
40  }
41  return $result;
42  }
43 }