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
InvalidateAfterStockSourceLinksDeletePlugin.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\StockSourceLinksDeleteInterface
;
12
use
Magento\InventoryIndexer\Indexer\InventoryIndexer
;
13
17
class
InvalidateAfterStockSourceLinksDeletePlugin
18
{
22
private
$indexerRegistry;
23
27
public
function
__construct
(
28
IndexerRegistry
$indexerRegistry
29
) {
30
$this->indexerRegistry =
$indexerRegistry
;
31
}
32
39
public
function
afterExecute
(
40
StockSourceLinksDeleteInterface
$subject,
41
$result
42
) {
43
$indexer
= $this->indexerRegistry->get(
InventoryIndexer::INDEXER_ID
);
44
if
(
$indexer
->isValid()) {
45
$indexer
->invalidate();
46
}
47
}
48
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\InventoryIndexer\Plugin\InventoryApi\InvalidateAfterStockSourceLinksDeletePlugin
Definition:
InvalidateAfterStockSourceLinksDeletePlugin.php:17
Magento\InventoryIndexer\Plugin\InventoryApi\InvalidateAfterStockSourceLinksDeletePlugin\afterExecute
afterExecute(StockSourceLinksDeleteInterface $subject, $result)
Definition:
InvalidateAfterStockSourceLinksDeletePlugin.php:39
Magento\InventoryIndexer\Plugin\InventoryApi\InvalidateAfterStockSourceLinksDeletePlugin\__construct
__construct(IndexerRegistry $indexerRegistry)
Definition:
InvalidateAfterStockSourceLinksDeletePlugin.php:27
$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\InventoryApi\Api\StockSourceLinksDeleteInterface
Definition:
StockSourceLinksDeleteInterface.php:18
Magento\InventoryIndexer\Indexer\InventoryIndexer
Definition:
InventoryIndexer.php:18
Magento\InventoryIndexer\Indexer\InventoryIndexer\INDEXER_ID
const INDEXER_ID
Definition:
InventoryIndexer.php:23
$indexer
$indexer
Definition:
product_different_store_prices.php:21