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-product-alert
Controller
Add.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\ProductAlert\Controller
;
7
8
use
Magento\Framework\App\Action\Action
;
9
use
Magento\Framework\App\Action\Context
;
10
use
Magento\Customer\Model\Session
as
CustomerSession
;
11
use
Magento\Framework\App\RequestInterface
;
12
13
abstract
class
Add
extends
Action
14
{
18
protected
$customerSession
;
19
24
public
function
__construct
(
25
Context
$context,
26
CustomerSession
$customerSession
27
) {
28
$this->customerSession =
$customerSession
;
29
parent::__construct($context);
30
}
31
38
public
function
dispatch
(
RequestInterface
$request
)
39
{
40
if
(!$this->customerSession->authenticate()) {
41
$this->_actionFlag->set(
''
,
'no-dispatch'
,
true
);
42
if
(!$this->customerSession->getBeforeUrl()) {
43
$this->customerSession->setBeforeUrl($this->
_redirect
->getRefererUrl());
44
}
45
}
46
return
parent::dispatch(
$request
);
47
}
48
}
Magento\Framework\App\Action\Action\_redirect
_redirect($path, $arguments=[])
Definition:
Action.php:167
Magento\Customer\Model\Session
Definition:
Storage.php:8
Magento\ProductAlert\Controller
Magento\ProductAlert\Controller\Add\$customerSession
$customerSession
Definition:
Add.php:18
Magento\ProductAlert\Controller\Add
Definition:
Add.php:13
Magento\ProductAlert\Controller\Add\dispatch
dispatch(RequestInterface $request)
Definition:
Add.php:38
Magento\Framework\App\RequestInterface
Definition:
RequestInterface.php:14
Magento\ProductAlert\Controller\Add\__construct
__construct(Context $context, CustomerSession $customerSession)
Definition:
Add.php:24
$request
$request
Definition:
quote_with_configurable_product_last_variation.php:22
Magento\Framework\App\Action\Context
Definition:
Context.php:24
Magento\Framework\App\Action\Action
Definition:
Action.php:25