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
App
Action
Plugin
Design.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App\Action\Plugin
;
7
8
use
Magento\Framework\Message\MessageInterface
;
9
10
class
Design
11
{
15
protected
$_designLoader
;
16
20
protected
$messageManager
;
21
26
public
function
__construct
(
27
\
Magento
\Framework\
View
\DesignLoader $designLoader,
28
\
Magento
\Framework\Message\
ManagerInterface
$messageManager
29
) {
30
$this->_designLoader = $designLoader;
31
$this->messageManager =
$messageManager
;
32
}
33
43
public
function
beforeDispatch(
44
\
Magento
\Framework\
App
\
ActionInterface
$subject,
45
\
Magento
\Framework\
App
\
RequestInterface
$request
46
) {
47
try
{
48
$this->_designLoader->load();
49
}
catch
(\
Magento
\Framework\Exception\
LocalizedException
$e) {
50
if
($e->getPrevious() instanceof \Magento\Framework\Config\Dom\ValidationException) {
52
$message
= $this->messageManager
53
->createMessage(
MessageInterface::TYPE_ERROR
)
54
->setText($e->getMessage());
55
$this->messageManager->addUniqueMessages([
$message
]);
56
}
57
}
58
}
59
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Framework\App
$message
$message
Definition:
notifications.php:7
Magento\Framework\Message\MessageInterface
Definition:
MessageInterface.php:14
Magento\Framework\App\Action\Plugin
Definition:
Design.php:6
Magento\Framework\App\RequestInterface
Definition:
RequestInterface.php:14
Magento\Framework\Event\ManagerInterface
Definition:
ManagerInterface.php:12
Magento\Framework\App\ActionInterface
Definition:
ActionInterface.php:14
Magento
$request
$request
Definition:
quote_with_configurable_product_last_variation.php:22
Magento\Framework\App\Action\Plugin\Design\$_designLoader
$_designLoader
Definition:
Design.php:15
Magento\Framework\Message\MessageInterface\TYPE_ERROR
const TYPE_ERROR
Definition:
MessageInterface.php:24
Magento\Framework\App\View
Definition:
View.php:8
Magento\Framework\App\Action\Plugin\Design
Definition:
Design.php:10
Magento\Framework\App\Action\Plugin\Design\$messageManager
$messageManager
Definition:
Design.php:20
Magento\Framework\App\Action\Plugin\Design\__construct
__construct(\Magento\Framework\View\DesignLoader $designLoader, \Magento\Framework\Message\ManagerInterface $messageManager)
Definition:
Design.php:26