mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
65 lines
1.5 KiB
PHP
65 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
|
|
/**
|
|
* Newsletter subscribe controller
|
|
*/
|
|
namespace Magento\Newsletter\Controller;
|
|
|
|
use Magento\Framework\App\Action\Context;
|
|
use Magento\Store\Model\StoreManagerInterface;
|
|
use Magento\Customer\Model\Session;
|
|
use Magento\Newsletter\Model\SubscriberFactory;
|
|
use Magento\Customer\Model\Url as CustomerUrl;
|
|
|
|
abstract class Subscriber extends \Magento\Framework\App\Action\Action
|
|
{
|
|
/**
|
|
* Customer session
|
|
*
|
|
* @var Session
|
|
*/
|
|
protected $_customerSession;
|
|
|
|
/**
|
|
* Subscriber factory
|
|
*
|
|
* @var SubscriberFactory
|
|
*/
|
|
protected $_subscriberFactory;
|
|
|
|
/**
|
|
* @var \Magento\Store\Model\StoreManagerInterface
|
|
*/
|
|
protected $_storeManager;
|
|
|
|
/**
|
|
* @var CustomerUrl
|
|
*/
|
|
protected $_customerUrl;
|
|
|
|
/**
|
|
* @param Context $context
|
|
* @param SubscriberFactory $subscriberFactory
|
|
* @param Session $customerSession
|
|
* @param StoreManagerInterface $storeManager
|
|
* @param CustomerUrl $customerUrl
|
|
*/
|
|
public function __construct(
|
|
Context $context,
|
|
SubscriberFactory $subscriberFactory,
|
|
Session $customerSession,
|
|
StoreManagerInterface $storeManager,
|
|
CustomerUrl $customerUrl
|
|
) {
|
|
parent::__construct($context);
|
|
$this->_storeManager = $storeManager;
|
|
$this->_subscriberFactory = $subscriberFactory;
|
|
$this->_customerSession = $customerSession;
|
|
$this->_customerUrl = $customerUrl;
|
|
}
|
|
}
|