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-customer
Model
Authorization
CustomerSessionUserContext.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Customer\Model\Authorization
;
8
9
use
Magento\Authorization\Model\UserContextInterface
;
10
use
Magento\Customer\Model\Session
as
CustomerSession
;
11
15
class
CustomerSessionUserContext
implements
UserContextInterface
16
{
20
protected
$_customerSession
;
21
27
public
function
__construct
(
28
CustomerSession
$customerSession
29
) {
30
$this->_customerSession = $customerSession;
31
}
32
36
public
function
getUserId
()
37
{
38
return
$this->_customerSession->getId();
39
}
40
44
public
function
getUserType
()
45
{
46
return
UserContextInterface::USER_TYPE_CUSTOMER
;
47
}
48
}
Magento\Customer\Model\Authorization\CustomerSessionUserContext
Definition:
CustomerSessionUserContext.php:15
Magento\Customer\Model\Authorization\CustomerSessionUserContext\getUserType
getUserType()
Definition:
CustomerSessionUserContext.php:44
Magento\Customer\Model\Session
Definition:
Storage.php:8
Magento\Customer\Model\Authorization\CustomerSessionUserContext\$_customerSession
$_customerSession
Definition:
CustomerSessionUserContext.php:20
Magento\Authorization\Model\UserContextInterface
Definition:
UserContextInterface.php:15
Magento\Customer\Model\Authorization
Definition:
CustomerSessionUserContext.php:7
Magento\Customer\Model\Authorization\CustomerSessionUserContext\__construct
__construct(CustomerSession $customerSession)
Definition:
CustomerSessionUserContext.php:27
Magento\Customer\Model\Authorization\CustomerSessionUserContext\getUserId
getUserId()
Definition:
CustomerSessionUserContext.php:36
Magento\Authorization\Model\UserContextInterface\USER_TYPE_CUSTOMER
const USER_TYPE_CUSTOMER
Definition:
UserContextInterface.php:22