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
framework
Pricing
PriceInfo
Base.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Pricing\PriceInfo
;
8
9
use
Magento\Framework\Pricing\Adjustment\AdjustmentInterface
;
10
use
Magento\Framework\Pricing\Adjustment\Collection
;
11
use
Magento\Framework\Pricing\Price\Collection
as PriceCollection;
12
use
Magento\Framework\Pricing\Price\PriceInterface
;
13
use
Magento\Framework\Pricing\PriceInfoInterface
;
14
22
class
Base
implements
PriceInfoInterface
23
{
27
protected
$priceCollection
;
28
32
protected
$adjustmentCollection
;
33
38
public
function
__construct
(
39
PriceCollection
$prices
,
40
Collection
$adjustmentCollection
41
) {
42
$this->adjustmentCollection =
$adjustmentCollection
;
43
$this->priceCollection =
$prices
;
44
}
45
51
public
function
getPrices
()
52
{
53
return
$this->priceCollection
;
54
}
55
62
public
function
getPrice
($priceCode)
63
{
64
return
$this->priceCollection->get($priceCode);
65
}
66
72
public
function
getAdjustments
()
73
{
74
return
$this->adjustmentCollection->getItems();
75
}
76
84
public
function
getAdjustment
($adjustmentCode)
85
{
86
return
$this->adjustmentCollection->getItemByCode($adjustmentCode);
87
}
88
}
Magento\Framework\Pricing\PriceInfo\Base\getAdjustment
getAdjustment($adjustmentCode)
Definition:
Base.php:84
Magento\Framework\Pricing\PriceInfo
Definition:
Base.php:7
Magento\Framework\Pricing\PriceInfo\Base\$priceCollection
$priceCollection
Definition:
Base.php:27
Magento\Framework\Pricing\Price\Collection
Definition:
Collection.php:17
$prices
$prices
Definition:
products_advanced.php:11
Magento\Framework\Pricing\PriceInfo\Base\__construct
__construct(PriceCollection $prices, Collection $adjustmentCollection)
Definition:
Base.php:38
Magento\Framework\Pricing\Adjustment\Collection
Definition:
Collection.php:15
Magento\Framework\Pricing\PriceInfo\Base\getPrice
getPrice($priceCode)
Definition:
Base.php:62
Magento\Framework\Pricing\PriceInfoInterface
Definition:
PriceInfoInterface.php:18
Magento\Framework\Pricing\Adjustment\AdjustmentInterface
Definition:
AdjustmentInterface.php:17
Magento\Framework\Pricing\PriceInfo\Base\getAdjustments
getAdjustments()
Definition:
Base.php:72
Magento\Framework\Pricing\PriceInfo\Base
Definition:
Base.php:22
Magento\Framework\Pricing\PriceInfo\Base\$adjustmentCollection
$adjustmentCollection
Definition:
Base.php:32
Magento\Framework\Pricing\PriceInfo\Base\getPrices
getPrices()
Definition:
Base.php:51
Magento\Framework\Pricing\Price\PriceInterface
Definition:
PriceInterface.php:17