File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
InventoryIndexer/Plugin/InventoryApi Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \InventoryIndexer \Plugin \InventoryApi ;
9
9
10
+ use Magento \Framework \Exception \LocalizedException ;
10
11
use Magento \InventoryApi \Api \Data \SourceItemInterface ;
11
12
use Magento \InventoryApi \Api \SourceItemsSaveInterface ;
12
13
use Magento \InventoryCatalogApi \Api \DefaultSourceProviderInterface ;
13
14
use Magento \InventoryIndexer \Indexer \SourceItem \GetSourceItemIds ;
14
15
use Magento \InventoryIndexer \Indexer \SourceItem \SourceItemIndexer ;
15
16
16
- /**
17
- * Reindex after source items save plugin
18
- */
19
17
class ReindexAfterSourceItemsSavePlugin
20
18
{
21
19
/**
@@ -49,10 +47,13 @@ public function __construct(
49
47
}
50
48
51
49
/**
50
+ * Run reindex process for saved source items
51
+ *
52
52
* @param SourceItemsSaveInterface $subject
53
53
* @param void $result
54
54
* @param SourceItemInterface[] $sourceItems
55
55
* @return void
56
+ * @throws LocalizedException
56
57
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
57
58
*/
58
59
public function afterExecute (
@@ -67,6 +68,12 @@ public function afterExecute(
67
68
}
68
69
}
69
70
71
+ /**
72
+ * Remove items with default source
73
+ *
74
+ * @param array $sourceItems
75
+ * @return array
76
+ */
70
77
private function sanitizeSources (array $ sourceItems ) : array
71
78
{
72
79
$ result = [];
You can’t perform that action at this time.
0 commit comments