Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Decimal.php
Go to the documentation of this file.
1 <?php
8 
12 
16 class Decimal implements GeneratorInterface
17 {
21  public function getFilterData(Attribute $attribute, $filterName)
22  {
23  return [
25  'name' => $filterName,
26  'field' => $attribute->getAttributeCode(),
27  'from' => '$' . $attribute->getAttributeCode() . '.from$',
28  'to' => '$' . $attribute->getAttributeCode() . '.to$',
29  ];
30  }
31 
35  public function getAggregationData(Attribute $attribute, $bucketName)
36  {
37  return [
38  'type' => BucketInterface::TYPE_DYNAMIC,
39  'name' => $bucketName,
40  'field' => $attribute->getAttributeCode(),
41  'method' => 'manual',
42  'metric' => [['type' => 'count']],
43  ];
44  }
45 }
getFilterData(Attribute $attribute, $filterName)
Definition: Decimal.php:21
getAggregationData(Attribute $attribute, $bucketName)
Definition: Decimal.php:35