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-indexer
Plugin
InventoryApi
InvalidateAfterStockSourceLinksSavePlugin.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryIndexer\Plugin\InventoryApi
;
9
10
use
Magento\Framework\Indexer\IndexerRegistry
;
11
use
Magento\InventoryApi\Api\StockSourceLinksSaveInterface
;
12
use
Magento\InventoryIndexer\Indexer\InventoryIndexer
;
13
17
class
InvalidateAfterStockSourceLinksSavePlugin
18
{
22
private
$indexerRegistry;
23
27
public
function
__construct
(
28
IndexerRegistry
$indexerRegistry
29
) {
30
$this->indexerRegistry =
$indexerRegistry
;
31
}
32
38
public
function
afterExecute
(
39
StockSourceLinksSaveInterface
$subject,
40
$result
41
) {
42
$indexer
= $this->indexerRegistry->get(
InventoryIndexer::INDEXER_ID
);
43
if
(
$indexer
->isValid()) {
44
$indexer
->invalidate();
45
}
46
}
47
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\InventoryIndexer\Plugin\InventoryApi\InvalidateAfterStockSourceLinksSavePlugin\afterExecute
afterExecute(StockSourceLinksSaveInterface $subject, $result)
Definition:
InvalidateAfterStockSourceLinksSavePlugin.php:38
$indexerRegistry
$indexerRegistry
Definition:
product_different_store_prices.php:20
Magento\InventoryIndexer\Plugin\InventoryApi
Definition:
InvalidateAfterEnablingOrDisablingSourcePlugin.php:8
Magento\Framework\Indexer\IndexerRegistry
Definition:
IndexerRegistry.php:12
Magento\InventoryIndexer\Indexer\InventoryIndexer
Definition:
InventoryIndexer.php:18
Magento\InventoryIndexer\Plugin\InventoryApi\InvalidateAfterStockSourceLinksSavePlugin\__construct
__construct(IndexerRegistry $indexerRegistry)
Definition:
InvalidateAfterStockSourceLinksSavePlugin.php:27
Magento\InventoryIndexer\Indexer\InventoryIndexer\INDEXER_ID
const INDEXER_ID
Definition:
InventoryIndexer.php:23
Magento\InventoryApi\Api\StockSourceLinksSaveInterface
Definition:
StockSourceLinksSaveInterface.php:18
$indexer
$indexer
Definition:
product_different_store_prices.php:21
Magento\InventoryIndexer\Plugin\InventoryApi\InvalidateAfterStockSourceLinksSavePlugin
Definition:
InvalidateAfterStockSourceLinksSavePlugin.php:17