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
App
Config
ValueFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App\Config
;
7
11
class
ValueFactory
12
{
18
protected
$_objectManager
=
null
;
19
25
protected
$_instanceName
=
null
;
26
33
public
function
__construct
(
34
\
Magento
\Framework\
ObjectManagerInterface
$objectManager
,
35
$instanceName = \
Magento
\Framework\
App
\
Config
\ValueInterface::class
36
) {
37
$this->_objectManager =
$objectManager
;
38
$this->_instanceName = $instanceName;
39
}
40
48
public
function
create
(array
$data
= [])
49
{
50
$model
= $this->_objectManager->create($this->_instanceName,
$data
);
51
if
(!
$model
instanceof \
Magento
\Framework\
App
\
Config
\
ValueInterface
) {
52
throw
new \InvalidArgumentException(
'Invalid config field model: '
. $this->_instanceName);
53
}
54
return
$model
;
55
}
56
}
Magento\Framework\App\Config
Definition:
Base.php:9
Magento\Framework\App
Magento\Framework\App\Config\ValueInterface
Definition:
ValueInterface.php:17
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$model
$model
Definition:
enable_catalog_product_reindex_schedule.php:9
Magento\Framework\App\Config\ValueFactory\$_instanceName
$_instanceName
Definition:
ValueFactory.php:25
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\App\Config\ValueFactory
Definition:
ValueFactory.php:11
Magento\Framework\App\Config\ValueFactory\create
create(array $data=[])
Definition:
ValueFactory.php:48
Magento
Magento\Framework\App\Config\ValueFactory\$_objectManager
$_objectManager
Definition:
ValueFactory.php:18
Magento\Framework\App\Config
Definition:
Config.php:17
Magento\Framework\App\Config\ValueFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\App\Config\ValueInterface::class)
Definition:
ValueFactory.php:33