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-catalog-admin-ui
Plugin
InventoryAdminUi
Stock
StockSaveProcessor
PreventProcessDefaultStockLinksPlugin.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryCatalogAdminUi\Plugin\InventoryAdminUi\Stock\StockSaveProcessor
;
9
10
use
Magento\InventoryAdminUi\Model\Stock\StockSourceLinkProcessor
;
11
use
Magento\InventoryCatalogApi\Api\DefaultStockProviderInterface
;
12
16
class
PreventProcessDefaultStockLinksPlugin
17
{
21
private
$defaultStockProvider;
22
26
public
function
__construct
(
DefaultStockProviderInterface
$defaultStockProvider)
27
{
28
$this->defaultStockProvider = $defaultStockProvider;
29
}
30
41
public
function
aroundProcess
(
StockSourceLinkProcessor
$subject, \Closure $proceed,
int
$stockId, array
$linksData
)
42
{
43
if
($stockId !== $this->defaultStockProvider->getId()) {
44
$proceed($stockId,
$linksData
);
45
}
46
}
47
}
Magento\InventoryCatalogAdminUi\Plugin\InventoryAdminUi\Stock\StockSaveProcessor\PreventProcessDefaultStockLinksPlugin\aroundProcess
aroundProcess(StockSourceLinkProcessor $subject, \Closure $proceed, int $stockId, array $linksData)
Definition:
PreventProcessDefaultStockLinksPlugin.php:41
$linksData
$linksData
Definition:
stock_source_links.php:36
Magento\InventoryCatalogAdminUi\Plugin\InventoryAdminUi\Stock\StockSaveProcessor
Definition:
PreventProcessDefaultStockLinksPlugin.php:8
Magento\InventoryCatalogAdminUi\Plugin\InventoryAdminUi\Stock\StockSaveProcessor\PreventProcessDefaultStockLinksPlugin\__construct
__construct(DefaultStockProviderInterface $defaultStockProvider)
Definition:
PreventProcessDefaultStockLinksPlugin.php:26
Magento\InventoryCatalogApi\Api\DefaultStockProviderInterface
Definition:
DefaultStockProviderInterface.php:15
Magento\InventoryCatalogAdminUi\Plugin\InventoryAdminUi\Stock\StockSaveProcessor\PreventProcessDefaultStockLinksPlugin
Definition:
PreventProcessDefaultStockLinksPlugin.php:16
Magento\InventoryAdminUi\Model\Stock\StockSourceLinkProcessor
Definition:
StockSourceLinkProcessor.php:23