39 $this->algorithm = $algorithm;
40 $this->layer = $layerResolver->
get();
41 $this->scopeConfig = $scopeConfig;
42 $this->render = $render;
43 $this->coreRegistry = $coreRegistry;
44 $this->range = $range;
54 public function getItemsData(array $intervals = [], $additionalRequestData =
'')
57 if (empty($intervals)) {
58 $range = $this->range->getPriceRange();
60 $range = $this->range->getConfigRangeStep();
61 $dbRanges = $this->resource->getCount($range);
62 $dbRanges = $this->processRange($dbRanges);
63 $data = $this->render->renderRangeData($range, $dbRanges);
74 private function processRange(
$items)
79 foreach (
$items as $k => $v) {
81 if (
$i > 1 &&
$i > $maxIntervalsNumber) {
98 return (
int)$this->scopeConfig->getValue(
99 self::XML_PATH_RANGE_MAX_INTERVALS,
100 ScopeInterface::SCOPE_STORE
const XML_PATH_RANGE_MAX_INTERVALS
__construct(Algorithm $algorithm, Resolver $layerResolver, ScopeConfigInterface $scopeConfig, Render $render, Registry $coreRegistry, Price $resource, Range $range)
getItemsData(array $intervals=[], $additionalRequestData='')