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-store
App
Action
Plugin
StoreCheck.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Store\App\Action\Plugin
;
8
9
class
StoreCheck
10
{
14
protected
$_storeManager
;
15
19
public
function
__construct
(
20
\
Magento
\Store\Model\
StoreManagerInterface
$storeManager
21
) {
22
$this->_storeManager =
$storeManager
;
23
}
24
32
public
function
beforeDispatch
(
33
\
Magento
\Framework\
App
\Action\
AbstractAction
$subject,
34
\
Magento
\Framework\
App
\
RequestInterface
$request
35
) {
36
if
(!$this->_storeManager->getStore()->isActive()) {
37
throw
new \Magento\Framework\Exception\State\InitException(
38
__
(
'Current store is not active.'
)
39
);
40
}
41
}
42
}
Magento\Framework\App
$storeManager
$storeManager
Definition:
paypal_quote.php:14
__
__()
Definition:
__.php:13
Magento\Store\App\Action\Plugin\StoreCheck\$_storeManager
$_storeManager
Definition:
StoreCheck.php:14
Magento\Store\Model\StoreManagerInterface
Definition:
StoreManagerInterface.php:17
Magento\Framework\App\RequestInterface
Definition:
RequestInterface.php:14
Magento\Store\App\Action\Plugin
Definition:
Context.php:7
Magento
$request
$request
Definition:
quote_with_configurable_product_last_variation.php:22
Magento\Store\App\Action\Plugin\StoreCheck\beforeDispatch
beforeDispatch(\Magento\Framework\App\Action\AbstractAction $subject, \Magento\Framework\App\RequestInterface $request)
Definition:
StoreCheck.php:32
Magento\Framework\App\Action\AbstractAction
Definition:
AbstractAction.php:13
Magento\Store\App\Action\Plugin\StoreCheck
Definition:
StoreCheck.php:9
Magento\Store\App\Action\Plugin\StoreCheck\__construct
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager)
Definition:
StoreCheck.php:19