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-wishlist
Model
LocaleQuantityProcessor.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Wishlist\Model
;
8
13
class
LocaleQuantityProcessor
14
{
18
protected
$localeResolver
;
19
23
protected
$localFilter
;
24
29
public
function
__construct
(
30
\
Magento
\Framework\Locale\
ResolverInterface
$localeResolver
,
31
\
Magento
\Framework\Filter\LocalizedToNormalized
$localFilter
32
) {
33
$this->localeResolver =
$localeResolver
;
34
$this->localFilter =
$localFilter
;
35
}
36
43
public
function
process
($qty)
44
{
45
$this->localFilter->setOptions([
'locale'
=> $this->localeResolver->getLocale()]);
46
$qty = $this->localFilter->filter((
double
)$qty);
47
if
($qty < 0) {
48
$qty =
null
;
49
}
50
return
$qty;
51
}
52
}
Magento\Wishlist\Model
Definition:
ItemTest.php:7
Magento\Wishlist\Model\LocaleQuantityProcessor
Definition:
LocaleQuantityProcessor.php:13
Magento\Framework\Locale\ResolverInterface
Definition:
ResolverInterface.php:14
Magento\Wishlist\Model\LocaleQuantityProcessor\$localFilter
$localFilter
Definition:
LocaleQuantityProcessor.php:23
Magento
Magento\Wishlist\Model\LocaleQuantityProcessor\$localeResolver
$localeResolver
Definition:
LocaleQuantityProcessor.php:18
Magento\Wishlist\Model\LocaleQuantityProcessor\process
process($qty)
Definition:
LocaleQuantityProcessor.php:43
Magento\Wishlist\Model\LocaleQuantityProcessor\__construct
__construct(\Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\Filter\LocalizedToNormalized $localFilter)
Definition:
LocaleQuantityProcessor.php:29