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
Data
Argument
Interpreter
Boolean.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Data\Argument\Interpreter
;
7
8
use
Magento\Framework\Data\Argument\InterpreterInterface
;
9
use
Magento\Framework\Stdlib\BooleanUtils
;
10
14
class
Boolean
implements
InterpreterInterface
15
{
19
private
$booleanUtils;
20
24
public
function
__construct
(
BooleanUtils
$booleanUtils)
25
{
26
$this->booleanUtils = $booleanUtils;
27
}
28
34
public
function
evaluate
(array
$data
)
35
{
36
if
(!isset(
$data
[
'value'
])) {
37
throw
new \InvalidArgumentException(
'Boolean value is missing.'
);
38
}
39
$value
=
$data
[
'value'
];
40
return
$this->booleanUtils->toBoolean(
$value
);
41
}
42
}
Magento\Framework\Data\Argument\Interpreter\Boolean\evaluate
evaluate(array $data)
Definition:
Boolean.php:34
Magento\Framework\Data\Argument\Interpreter\Boolean\__construct
__construct(BooleanUtils $booleanUtils)
Definition:
Boolean.php:24
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
$value
$value
Definition:
gender.phtml:16
Magento\Framework\Data\Argument\Interpreter\Boolean
Definition:
Boolean.php:14
Magento\Framework\Stdlib\BooleanUtils
Definition:
BooleanUtils.php:14
Magento\Framework\Data\Argument\InterpreterInterface
Definition:
InterpreterInterface.php:14
Magento\Framework\Data\Argument\Interpreter
Definition:
ArrayType.php:6