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
Controller
Guest
OrderViewAuthorization.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Sales\Controller\Guest
;
8
9
use
Magento\Sales\Controller\AbstractController\OrderViewAuthorizationInterface
;
10
11
class
OrderViewAuthorization
implements
OrderViewAuthorizationInterface
12
{
16
protected
$registry
;
17
21
public
function
__construct
(\
Magento
\Framework\Registry
$registry
)
22
{
23
$this->registry =
$registry
;
24
}
25
29
public
function
canView
(\
Magento
\Sales\Model\Order
$order
)
30
{
31
$currentOrder = $this->registry->registry(
'current_order'
);
32
if
(
$order
->getId() &&
$order
->getId() === $currentOrder->getId()) {
33
return
true
;
34
}
35
return
false
;
36
}
37
}
$order
$order
Definition:
order.php:55
Magento\Sales\Controller\Guest\OrderViewAuthorization\$registry
$registry
Definition:
OrderViewAuthorization.php:16
Magento\Sales\Controller\Guest\OrderViewAuthorization\__construct
__construct(\Magento\Framework\Registry $registry)
Definition:
OrderViewAuthorization.php:21
Magento\Sales\Controller\Guest\OrderViewAuthorization\canView
canView(\Magento\Sales\Model\Order $order)
Definition:
OrderViewAuthorization.php:29
Magento\Sales\Controller\AbstractController\OrderViewAuthorizationInterface
Definition:
OrderViewAuthorizationInterface.php:13
Magento
Magento\Sales\Controller\Guest
Definition:
Creditmemo.php:7
Magento\Sales\Controller\Guest\OrderViewAuthorization
Definition:
OrderViewAuthorization.php:11