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-bundle
Pricing
Price
BundleSelectionFactory.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Bundle\Pricing\Price
;
8
9
use
Magento\Catalog\Model\Product
;
10
16
class
BundleSelectionFactory
17
{
21
const
SELECTION_CLASS_DEFAULT
= \Magento\Bundle\Pricing\Price\BundleSelectionPrice::class;
22
28
protected
$objectManager
;
29
35
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
36
{
37
$this->objectManager =
$objectManager
;
38
}
39
49
public
function
create
(
50
Product
$bundleProduct
,
51
Product
$selection,
52
$quantity,
53
array
$arguments
= []
54
) {
55
$arguments
[
'bundleProduct'
] =
$bundleProduct
;
56
$arguments
[
'saleableItem'
] = $selection;
57
$arguments
[
'quantity'
] = $quantity ? (float)$quantity : 1.;
58
59
return
$this->objectManager->create(self::SELECTION_CLASS_DEFAULT,
$arguments
);
60
}
61
}
Magento\Bundle\Pricing\Price\BundleSelectionFactory\create
create(Product $bundleProduct, Product $selection, $quantity, array $arguments=[])
Definition:
BundleSelectionFactory.php:49
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Bundle\Pricing\Price\BundleSelectionFactory\$objectManager
$objectManager
Definition:
BundleSelectionFactory.php:28
Magento\Bundle\Pricing\Price\BundleSelectionFactory
Definition:
BundleSelectionFactory.php:16
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
Magento
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Bundle\Pricing\Price\BundleSelectionFactory\SELECTION_CLASS_DEFAULT
const SELECTION_CLASS_DEFAULT
Definition:
BundleSelectionFactory.php:21
Magento\Bundle\Pricing\Price\BundleSelectionFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
BundleSelectionFactory.php:35
$bundleProduct
$bundleProduct
Definition:
product_bundle.php:10
Magento\Bundle\Pricing\Price
Definition:
BundleOptionPrice.php:6