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
Model
Product
CatalogPriceFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Model\Product
;
7
11
class
CatalogPriceFactory
12
{
16
protected
$objectManager
;
17
21
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
22
{
23
$this->objectManager =
$objectManager
;
24
}
25
33
public
function
create
(
$name
)
34
{
35
$customPriceModel = $this->objectManager->get(
$name
);
36
if
(!$customPriceModel instanceof \
Magento
\Catalog\Model\
Product
\
CatalogPriceInterface
) {
37
throw
new \UnexpectedValueException(
38
'Class '
.
$name
.
' should be an instance of \Magento\Catalog\Model\Product\CatalogPriceInterface'
39
);
40
}
41
42
return
$customPriceModel;
43
}
44
}
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Catalog\Model\Product\CatalogPriceFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
CatalogPriceFactory.php:21
Magento\Catalog\Model\Product\CatalogPriceInterface
Definition:
CatalogPriceInterface.php:15
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
Magento
Magento\Catalog\Model\Product\CatalogPriceFactory\create
create($name)
Definition:
CatalogPriceFactory.php:33
Magento\Catalog\Model\Product\CatalogPriceFactory\$objectManager
$objectManager
Definition:
CatalogPriceFactory.php:16
Magento\Catalog\Model\Product\CatalogPriceFactory
Definition:
CatalogPriceFactory.php:11
$name
if(!isset($_GET['name'])) $name
Definition:
log.php:14