Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (AmountFactory $amountFactory) | |
getAmount ($amount, SaleableInterface $saleableItem, $exclude=null, $context=[]) | |
Protected Attributes | |
$amountFactory | |
Class Calculator
Definition at line 15 of file Calculator.php.
__construct | ( | AmountFactory | $amountFactory | ) |
AmountFactory | $amountFactory |
Definition at line 25 of file Calculator.php.
getAmount | ( | $amount, | |
SaleableInterface | $saleableItem, | ||
$exclude = null , |
|||
$context = [] |
|||
) |
Retrieve Amount object based on given float amount, product and exclude option. It is possible to pass "true" or adjustment code to exclude all or specific adjustment from an amount.
float | string | $amount | |
SaleableInterface | $saleableItem | |
null | bool | string | array | $exclude | |
null | array | $context |
Implements CalculatorInterface.
Definition at line 41 of file Calculator.php.
|
protected |
Definition at line 20 of file Calculator.php.