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
View
Element
UiComponent
Argument
Interpreter
ConfigurableObject.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\Element\UiComponent\Argument\Interpreter
;
7
8
use
Magento\Framework\ObjectManagerInterface
;
9
use
Magento\Framework\Data\Argument\InterpreterInterface
;
10
14
class
ConfigurableObject
implements
InterpreterInterface
15
{
19
protected
$objectManager
;
20
24
protected
$argumentInterpreter
;
25
32
public
function
__construct
(
ObjectManagerInterface
$objectManager
,
InterpreterInterface
$argumentInterpreter
)
33
{
34
$this->objectManager =
$objectManager
;
35
$this->argumentInterpreter =
$argumentInterpreter
;
36
}
37
41
public
function
evaluate
(array
$data
)
42
{
43
if
(isset(
$data
[
'value'
])) {
44
$className
=
$data
[
'value'
];
45
$arguments
= [];
46
}
else
{
47
if
(!isset(
$data
[
'argument'
])) {
48
throw
new \InvalidArgumentException(
'Node "argument" required for this type.'
);
49
}
50
foreach
(
$data
[
'argument'
] as
$name
=> $argument) {
51
$arguments
[
$name
] = $this->argumentInterpreter->evaluate($argument);
52
}
53
if
(!isset(
$arguments
[
'class'
])) {
54
throw
new \InvalidArgumentException(
'Node "argument" with name "class" is required for this type.'
);
55
}
56
$className
=
$arguments
[
'class'
];
57
unset(
$arguments
[
'class'
]);
58
}
59
60
return
$this->objectManager->create(
$className
,
$arguments
);
61
}
62
}
Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject\evaluate
evaluate(array $data)
Definition:
ConfigurableObject.php:41
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject\$argumentInterpreter
$argumentInterpreter
Definition:
ConfigurableObject.php:24
Magento\Framework\View\Element\UiComponent\Argument\Interpreter
Definition:
ConfigurableObject.php:6
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject
Definition:
ConfigurableObject.php:14
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\Data\Argument\InterpreterInterface
Definition:
InterpreterInterface.php:14
Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject\$objectManager
$objectManager
Definition:
ConfigurableObject.php:19
Magento\Framework\View\Element\UiComponent\Argument\Interpreter\ConfigurableObject\__construct
__construct(ObjectManagerInterface $objectManager, InterpreterInterface $argumentInterpreter)
Definition:
ConfigurableObject.php:32
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31
$name
if(!isset($_GET['name'])) $name
Definition:
log.php:14