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-signifyd
Model
MessageGenerators
CaseRescore.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Signifyd\Model\MessageGenerators
;
7
8
use
Magento\Signifyd\Api\CaseRepositoryInterface
;
9
13
class
CaseRescore
implements
GeneratorInterface
14
{
18
private
$caseRepository;
19
25
public
function
__construct
(
CaseRepositoryInterface
$caseRepository)
26
{
27
$this->caseRepository =
$caseRepository
;
28
}
29
33
public
function
generate
(array
$data
)
34
{
35
if
(empty(
$data
[
'caseId'
])) {
36
throw
new
GeneratorException
(
__
(
'The "%1" should not be empty.'
,
'caseId'
));
37
}
38
39
$caseEntity = $this->caseRepository->getByCaseId(
$data
[
'caseId'
]);
40
41
if
($caseEntity ===
null
) {
42
throw
new
GeneratorException
(
__
(
'Case entity not found.'
));
43
}
44
45
return
__
(
46
'Case Update: New score for the order is %1. Previous score was %2.'
,
47
!empty(
$data
[
'score'
]) ?
$data
[
'score'
] : 0,
48
$caseEntity->getScore()
49
);
50
}
51
}
Magento\Signifyd\Model\MessageGenerators\CaseRescore\generate
generate(array $data)
Definition:
CaseRescore.php:33
Magento\Signifyd\Model\MessageGenerators\GeneratorInterface
Definition:
GeneratorInterface.php:12
Magento\Signifyd\Model\MessageGenerators\CaseRescore
Definition:
CaseRescore.php:13
__
__()
Definition:
__.php:13
$caseRepository
$caseRepository
Definition:
approved_case.php:37
Magento\Signifyd\Model\MessageGenerators
Definition:
CaseRescore.php:6
Magento\Signifyd\Model\MessageGenerators\GeneratorException
Definition:
GeneratorException.php:16
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Signifyd\Model\MessageGenerators\CaseRescore\__construct
__construct(CaseRepositoryInterface $caseRepository)
Definition:
CaseRescore.php:25
Magento\Signifyd\Api\CaseRepositoryInterface
Definition:
CaseRepositoryInterface.php:14