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
StringUtils.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Data\Argument\Interpreter
;
8
9
use
Magento\Framework\Data\Argument\InterpreterInterface
;
10
use
Magento\Framework\Stdlib\BooleanUtils
;
11
15
class
StringUtils
implements
InterpreterInterface
16
{
20
private
$baseStringUtils;
21
25
private
$booleanUtils;
26
33
public
function
__construct
(
34
BooleanUtils
$booleanUtils,
35
BaseStringUtils
$baseStringUtils
36
) {
37
$this->booleanUtils = $booleanUtils;
38
$this->baseStringUtils = $baseStringUtils;
39
}
40
46
public
function
evaluate
(array
$data
)
47
{
48
$result
= $this->baseStringUtils->evaluate(
$data
);
49
$needTranslation = isset(
$data
[
'translate'
])
50
? $this->booleanUtils->toBoolean(
$data
[
'translate'
])
51
:
false
;
52
if
($needTranslation) {
53
$result
= (string)
new
\
Magento
\Framework\
Phrase
(
$result
);
54
}
55
56
return
$result
;
57
}
58
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Data\Argument\Interpreter\StringUtils
Definition:
StringUtils.php:15
Magento\Framework\Data\Argument\Interpreter\StringUtils\__construct
__construct(BooleanUtils $booleanUtils, BaseStringUtils $baseStringUtils)
Definition:
StringUtils.php:33
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento
Magento\Framework\Data\Argument\Interpreter\BaseStringUtils
Definition:
BaseStringUtils.php:15
Magento\Framework\Stdlib\BooleanUtils
Definition:
BooleanUtils.php:14
Magento\Framework\Data\Argument\InterpreterInterface
Definition:
InterpreterInterface.php:14
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Data\Argument\Interpreter\StringUtils\evaluate
evaluate(array $data)
Definition:
StringUtils.php:46
Magento\Framework\Data\Argument\Interpreter
Definition:
ArrayType.php:6