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-payment
Gateway
ErrorMapper
ErrorMessageMapper.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Payment\Gateway\ErrorMapper
;
9
10
use
Magento\Framework\Config\DataInterface
;
11
21
class
ErrorMessageMapper
implements
ErrorMessageMapperInterface
22
{
26
private
$messageMapping;
27
31
public
function
__construct
(
DataInterface
$messageMapping)
32
{
33
$this->messageMapping = $messageMapping;
34
}
35
39
public
function
getMessage
(
string
$code
)
40
{
41
$message
= $this->messageMapping->get(
$code
);
42
return
$message
?
__
(
$message
) :
null
;
43
}
44
}
Magento\Payment\Gateway\ErrorMapper\ErrorMessageMapperInterface
Definition:
ErrorMessageMapperInterface.php:17
Magento\Payment\Gateway\ErrorMapper\ErrorMessageMapper\getMessage
getMessage(string $code)
Definition:
ErrorMessageMapper.php:39
Magento\Payment\Gateway\ErrorMapper
Definition:
ErrorMessageMapper.php:8
__
__()
Definition:
__.php:13
$message
$message
Definition:
notifications.php:7
Magento\Payment\Gateway\ErrorMapper\ErrorMessageMapper
Definition:
ErrorMessageMapper.php:21
Magento\Payment\Gateway\ErrorMapper\ErrorMessageMapper\__construct
__construct(DataInterface $messageMapping)
Definition:
ErrorMessageMapper.php:31
Magento\Framework\Config\DataInterface
Definition:
DataInterface.php:14
$code
$code
Definition:
info.phtml:12