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-sales
Block
Order
Info
Buttons
Rss.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Sales\Block\Order\Info\Buttons
;
7
14
class
Rss
extends
\Magento\Framework\View\Element\Template
15
{
19
protected
$_template
=
'Magento_Sales::order/info/buttons/rss.phtml'
;
20
24
protected
$orderFactory
;
25
29
protected
$rssUrlBuilder
;
30
37
public
function
__construct
(
38
\
Magento
\Framework\
View
\
Element
\Template\
Context
$context,
39
\
Magento
\Sales\Model\OrderFactory
$orderFactory
,
40
\
Magento
\Framework\
App
\
Rss
\UrlBuilderInterface
$rssUrlBuilder
,
41
array
$data
= []
42
) {
43
$this->orderFactory =
$orderFactory
;
44
$this->rssUrlBuilder =
$rssUrlBuilder
;
45
parent::__construct($context,
$data
);
46
}
47
51
public
function
getLink
()
52
{
53
return
$this->rssUrlBuilder->getUrl($this->
getLinkParams
());
54
}
55
59
public
function
getLabel
()
60
{
61
return
__
(
'Subscribe to Order Status'
);
62
}
63
69
public
function
isRssAllowed
()
70
{
71
return
$this->_scopeConfig->isSetFlag(
72
'rss/order/status'
,
73
\
Magento
\
Store
\Model\
ScopeInterface::SCOPE_STORE
74
);
75
}
76
83
protected
function
getUrlKey
(
$order
)
84
{
85
$data
= [
86
'order_id'
=>
$order
->getId(),
87
'increment_id'
=>
$order
->getIncrementId(),
88
'customer_id'
=>
$order
->getCustomerId(),
89
];
90
return
base64_encode(json_encode(
$data
));
91
}
92
96
protected
function
getLinkParams
()
97
{
98
$order
= $this->orderFactory->create()->load($this->_request->getParam(
'order_id'
));
99
return
[
100
'type'
=>
'order_status'
,
101
'_secure'
=>
true
,
102
'_query'
=> [
'data'
=> $this->
getUrlKey
(
$order
)]
103
];
104
}
105
}
Magento\Framework\App\Config\Element
Definition:
Element.php:16
Magento\Sales\Block\Order\Info\Buttons\Rss\isRssAllowed
isRssAllowed()
Definition:
Rss.php:69
Magento\Framework\App
Magento\Store\Model\ScopeInterface\SCOPE_STORE
const SCOPE_STORE
Definition:
ScopeInterface.php:21
Magento\Sales\Block\Order\Info\Buttons\Rss\__construct
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder, array $data=[])
Definition:
Rss.php:37
$order
$order
Definition:
order.php:55
__
__()
Definition:
__.php:13
Magento\Sales\Block\Order\Info\Buttons\Rss\$_template
$_template
Definition:
Rss.php:19
Magento\Sales\Block\Order\Info\Buttons\Rss\getLinkParams
getLinkParams()
Definition:
Rss.php:96
Magento\Sales\Block\Order\Info\Buttons\Rss\getUrlKey
getUrlKey($order)
Definition:
Rss.php:83
Magento\Sales\Block\Order\Info\Buttons\Rss\getLabel
getLabel()
Definition:
Rss.php:59
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento
Magento\Sales\Block\Order\Info\Buttons
Definition:
Rss.php:6
Magento\Sales\Block\Order\Info\Buttons\Rss\$rssUrlBuilder
$rssUrlBuilder
Definition:
Rss.php:29
Magento\Framework\View\Element\Template
Definition:
Template.php:32
Magento\Sales\Block\Order\View
Definition:
View.php:16
Magento\Sales\Block\Order\Info\Buttons\Rss\getLink
getLink()
Definition:
Rss.php:51
Magento\Store\Model\Store
Definition:
Store.php:38
Magento\Customer\Model\Context
Definition:
Context.php:8
Magento\Sales\Block\Order\Info\Buttons\Rss
Definition:
Rss.php:14
Magento\Sales\Block\Order\Info\Buttons\Rss\$orderFactory
$orderFactory
Definition:
Rss.php:24