Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Manual Class Reference
Inheritance diagram for Manual:
AlgorithmInterface

Public Member Functions

 __construct (Algorithm $algorithm, Resolver $layerResolver, ScopeConfigInterface $scopeConfig, Render $render, Registry $coreRegistry, Price $resource, Range $range)
 
 getItemsData (array $intervals=[], $additionalRequestData='')
 
 getMaxIntervalsNumber ()
 

Data Fields

const XML_PATH_RANGE_MAX_INTERVALS = 'catalog/layered_navigation/price_range_max_intervals'
 

Detailed Description

Definition at line 17 of file Manual.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Algorithm  $algorithm,
Resolver  $layerResolver,
ScopeConfigInterface  $scopeConfig,
Render  $render,
Registry  $coreRegistry,
Price  $resource,
Range  $range 
)
Parameters
Algorithm$algorithm
Resolver$layerResolver
ScopeConfigInterface$scopeConfig
Render$render
Registry$coreRegistry
Price$resource
Range$range

Definition at line 30 of file Manual.php.

38  {
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;
45  $this->resource = $resource;
46  }
$resource
Definition: bulk.php:12

Member Function Documentation

◆ getItemsData()

getItemsData ( array  $intervals = [],
  $additionalRequestData = '' 
)
Parameters
int[]$intervals
string$additionalRequestData
Returns
array @SuppressWarnings(PHPMD.UnusedFormalParameter)

Implements AlgorithmInterface.

Definition at line 54 of file Manual.php.

55  {
56  $data = [];
57  if (empty($intervals)) {
58  $range = $this->range->getPriceRange();
59  if (!$range) {
60  $range = $this->range->getConfigRangeStep();
61  $dbRanges = $this->resource->getCount($range);
62  $dbRanges = $this->processRange($dbRanges);
63  $data = $this->render->renderRangeData($range, $dbRanges);
64  }
65  }
66 
67  return $data;
68  }

◆ getMaxIntervalsNumber()

getMaxIntervalsNumber ( )

Get maximum number of intervals

Returns
int

Definition at line 96 of file Manual.php.

97  {
98  return (int)$this->scopeConfig->getValue(
99  self::XML_PATH_RANGE_MAX_INTERVALS,
100  ScopeInterface::SCOPE_STORE
101  );
102  }

Field Documentation

◆ XML_PATH_RANGE_MAX_INTERVALS

const XML_PATH_RANGE_MAX_INTERVALS = 'catalog/layered_navigation/price_range_max_intervals'

Definition at line 19 of file Manual.php.


The documentation for this class was generated from the following file: