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-config
Model
Config
CommentFactory.php
Go to the documentation of this file.
1
<?php
10
namespace
Magento\Config\Model\Config
;
11
16
class
CommentFactory
17
{
21
protected
$_objectManager
;
22
26
public
function
__construct
(\
Magento
\Framework\ObjectManagerInterface
$objectManager
)
27
{
28
$this->_objectManager =
$objectManager
;
29
}
30
38
public
function
create
(
$type
)
39
{
40
$commentModel = $this->_objectManager->create(
$type
);
41
if
(!$commentModel instanceof
CommentInterface
) {
42
throw
new \InvalidArgumentException(
'Incorrect comment model provided'
);
43
}
44
return
$commentModel;
45
}
46
}
Magento\Config\Model\Config\CommentFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
CommentFactory.php:26
$objectManager
$objectManager
Definition:
bootstrap.php:17
$type
$type
Definition:
item.phtml:13
Magento\Config\Model\Config\CommentFactory\$_objectManager
$_objectManager
Definition:
CommentFactory.php:21
Magento
Magento\Config\Model\Config\CommentFactory
Definition:
CommentFactory.php:16
Magento\Framework\App\Config\CommentInterface
Definition:
CommentInterface.php:13
Magento\Config\Model\Config
Magento\Config\Model\Config\CommentFactory\create
create($type)
Definition:
CommentFactory.php:38