Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ListSort.php
Go to the documentation of this file.
1 <?php
13 
15 {
21  protected $_catalogConfig;
22 
28  public function __construct(\Magento\Catalog\Model\Config $catalogConfig)
29  {
30  $this->_catalogConfig = $catalogConfig;
31  }
32 
38  public function toOptionArray()
39  {
40  $options = [];
41  $options[] = ['label' => __('Position'), 'value' => 'position'];
43  $options[] = ['label' => __($attribute['frontend_label']), 'value' => $attribute['attribute_code']];
44  }
45  return $options;
46  }
47 
53  protected function _getCatalogConfig()
54  {
55  return $this->_catalogConfig;
56  }
57 }
__construct(\Magento\Catalog\Model\Config $catalogConfig)
Definition: ListSort.php:28
__()
Definition: __.php:13