Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog-search
Model
Search
RequestGenerator
Decimal.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CatalogSearch\Model\Search\RequestGenerator
;
8
9
use
Magento\Catalog\Model\ResourceModel\Eav\Attribute
;
10
use
Magento\Framework\Search\Request\BucketInterface
;
11
use
Magento\Framework\Search\Request\FilterInterface
;
12
16
class
Decimal
implements
GeneratorInterface
17
{
21
public
function
getFilterData
(
Attribute
$attribute
, $filterName)
22
{
23
return
[
24
'type'
=>
FilterInterface::TYPE_RANGE
,
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
}
Magento\CatalogSearch\Model\Search\RequestGenerator\Decimal
Definition:
Decimal.php:16
$attribute
$attribute
Definition:
attribute_set_with_image_attribute.php:41
Magento\CatalogSearch\Model\Search\RequestGenerator\GeneratorInterface
Definition:
GeneratorInterface.php:17
Magento\Framework\Search\Request\BucketInterface
Definition:
BucketInterface.php:14
Magento\Framework\Search\Request\FilterInterface\TYPE_RANGE
const TYPE_RANGE
Definition:
FilterInterface.php:23
Magento\CatalogSearch\Model\Search\RequestGenerator\Decimal\getFilterData
getFilterData(Attribute $attribute, $filterName)
Definition:
Decimal.php:21
Magento\CatalogSearch\Model\Search\RequestGenerator
Definition:
Decimal.php:7
Magento\CatalogSearch\Model\Search\RequestGenerator\Decimal\getAggregationData
getAggregationData(Attribute $attribute, $bucketName)
Definition:
Decimal.php:35
Magento\Catalog\Model\ResourceModel\Eav\Attribute
Definition:
Attribute.php:31
Magento\Framework\Search\Request\FilterInterface
Definition:
FilterInterface.php:14