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-inventory-sales-admin-ui
Model
WebsiteNameResolver.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventorySalesAdminUi\Model
;
9
10
use
Magento\InventorySalesApi\Api\Data\SalesChannelInterface
;
11
use
Magento\Store\Api\WebsiteRepositoryInterface
;
12
18
class
WebsiteNameResolver
implements
SalesChannelNameResolverInterface
19
{
23
private
$websiteRepository;
24
28
public
function
__construct
(
29
WebsiteRepositoryInterface
$websiteRepository
30
) {
31
$this->websiteRepository =
$websiteRepository
;
32
}
33
37
public
function
resolve
(
string
$type
,
string
$code
): string
38
{
39
return
SalesChannelInterface::TYPE_WEBSITE
===
$type
? $this->websiteRepository->get(
$code
)->getName() :
$code
;
40
}
41
}
Magento\InventorySalesAdminUi\Model\WebsiteNameResolver
Definition:
WebsiteNameResolver.php:18
Magento\InventorySalesAdminUi\Model\SalesChannelNameResolverInterface
Definition:
SalesChannelNameResolverInterface.php:13
Magento\InventorySalesAdminUi\Model\WebsiteNameResolver\resolve
resolve(string $type, string $code)
Definition:
WebsiteNameResolver.php:37
Magento\InventorySalesApi\Api\Data\SalesChannelInterface\TYPE_WEBSITE
const TYPE_WEBSITE
Definition:
SalesChannelInterface.php:29
$type
$type
Definition:
item.phtml:13
Magento\InventorySalesApi\Api\Data\SalesChannelInterface
Definition:
SalesChannelInterface.php:17
$websiteRepository
$websiteRepository
Definition:
payment_configuration_rollback.php:37
Magento\InventorySalesAdminUi\Model
Definition:
GetSalableQuantityDataBySku.php:8
Magento\InventorySalesAdminUi\Model\WebsiteNameResolver\__construct
__construct(WebsiteRepositoryInterface $websiteRepository)
Definition:
WebsiteNameResolver.php:28
Magento\Store\Api\WebsiteRepositoryInterface
Definition:
WebsiteRepositoryInterface.php:16
$code
$code
Definition:
info.phtml:12