File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
app/code/Magento/CatalogInventory/Model/Stock Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ class StockItemRepository implements StockItemRepositoryInterface
90
90
*/
91
91
protected $ stockRegistryStorage ;
92
92
93
+ /** @var \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory */
94
+ protected $ productCollectionFactory ;
95
+
93
96
/**
94
97
* @param StockConfigurationInterface $stockConfiguration
95
98
* @param StockStateProviderInterface $stockStateProvider
@@ -130,6 +133,20 @@ public function __construct(
130
133
$ this ->dateTime = $ dateTime ;
131
134
}
132
135
136
+ /**
137
+ * @return \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory
138
+ */
139
+ private function getProductCollectionFactory ()
140
+ {
141
+ if ($ this ->productCollectionFactory === null ) {
142
+ $ this ->productCollectionFactory = ObjectManager::getInstance ()->get (
143
+ \Magento \Catalog \Model \ResourceModel \Product \CollectionFactory::class
144
+ );
145
+ }
146
+
147
+ return $ this ->productCollectionFactory ;
148
+ }
149
+
133
150
/**
134
151
* @inheritdoc
135
152
*/
You can’t perform that action at this time.
0 commit comments