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-webapi
Controller
Rest
ParamOverriderCustomerId.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Webapi\Controller\Rest
;
8
9
use
Magento\Authorization\Model\UserContextInterface
;
10
use
Magento\Framework\Webapi\Rest\Request\ParamOverriderInterface
;
11
15
class
ParamOverriderCustomerId
implements
ParamOverriderInterface
16
{
20
private
$userContext;
21
27
public
function
__construct
(
UserContextInterface
$userContext)
28
{
29
$this->userContext = $userContext;
30
}
31
35
public
function
getOverriddenValue
()
36
{
37
if
($this->userContext->getUserType() === UserContextInterface::USER_TYPE_CUSTOMER) {
38
return
$this->userContext->getUserId();
39
}
40
return
null
;
41
}
42
}
Magento\Authorization\Model\UserContextInterface
Definition:
UserContextInterface.php:15
Magento\Webapi\Controller\Rest
Definition:
SchemaRequestProcessorTest.php:7
Magento\Webapi\Controller\Rest\ParamOverriderCustomerId\getOverriddenValue
getOverriddenValue()
Definition:
ParamOverriderCustomerId.php:35
Magento\Webapi\Controller\Rest\ParamOverriderCustomerId\__construct
__construct(UserContextInterface $userContext)
Definition:
ParamOverriderCustomerId.php:27
Magento\Webapi\Controller\Rest\ParamOverriderCustomerId
Definition:
ParamOverriderCustomerId.php:15
Magento\Framework\Webapi\Rest\Request\ParamOverriderInterface
Definition:
ParamOverriderInterface.php:32