Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Options.php
Go to the documentation of this file.
1 <?php
7 
11 
18 class Options implements OptionsInterface
19 {
20  const XML_PATH_INTERVAL_DIVISION_LIMIT = 'catalog/layered_navigation/interval_division_limit';
21  const XML_PATH_RANGE_STEP = 'catalog/layered_navigation/price_range_step';
22  const XML_PATH_RANGE_MAX_INTERVALS = 'catalog/layered_navigation/price_range_max_intervals';
23 
27  private $scopeConfig;
28 
32  public function __construct(ScopeConfigInterface $scopeConfig)
33  {
34  $this->scopeConfig = $scopeConfig;
35  }
36 
40  public function get()
41  {
42  return [
43  'interval_division_limit' => (int)$this->scopeConfig->getValue(
44  self::XML_PATH_INTERVAL_DIVISION_LIMIT,
46  ),
47  'range_step' => (double)$this->scopeConfig->getValue(
48  self::XML_PATH_RANGE_STEP,
50  ),
51  'min_range_power' => 10,
52  'max_intervals_number' => (int)$this->scopeConfig->getValue(
53  self::XML_PATH_RANGE_MAX_INTERVALS,
55  )
56  ];
57  }
58 }
__construct(ScopeConfigInterface $scopeConfig)
Definition: Options.php:32