-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathSubscribe.php
More file actions
45 lines (39 loc) · 1.05 KB
/
Subscribe.php
File metadata and controls
45 lines (39 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace Ebizmarts\MailChimp\Block;
use Magento\Framework\View\Element\Template;
use \Ebizmarts\MailChimp\Helper\Data as MailchimpHelper;
class Subscribe extends \Magento\Newsletter\Block\Subscribe
{
/**
* @var Template\Context
*/
protected $context;
/**
* @var MailchimpHelper
*/
protected $helper;
/**
* @param Template\Context $context
* @param MailchimpHelper $helper
* @param array $data
*/
public function __construct(
Template\Context $context,
MailchimpHelper $helper,
array $data = []
)
{
parent::__construct($context, $data);
$this->context = $context;
$this->helper = $helper;
}
public function getPopupUrl()
{
$storeId = $this->context->getStoreManager()->getStore()->getId();
return $this->helper->getConfigValue(MailchimpHelper::XML_POPUP_URL,$storeId);
}
public function getFormActionUrl()
{
return $this->getUrl('mailchimp/subscriber/subscribe', ['_secure' => true]);
}
}