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
Indexer
Stock
IndexDataProviderByStockId.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryIndexer\Indexer\Stock
;
9
10
use ArrayIterator;
11
use
Magento\Framework\App\ResourceConnection
;
12
use
Magento\InventoryIndexer\Indexer\SelectBuilder
;
13
17
class
IndexDataProviderByStockId
18
{
22
private
$resourceConnection;
23
27
private
$selectBuilder;
28
33
public
function
__construct
(
34
ResourceConnection
$resourceConnection,
35
SelectBuilder
$selectBuilder
36
) {
37
$this->resourceConnection =
$resourceConnection
;
38
$this->selectBuilder = $selectBuilder;
39
}
40
45
public
function
execute
(
int
$stockId): ArrayIterator
46
{
47
$select
= $this->selectBuilder->execute($stockId);
48
49
$connection
= $this->resourceConnection->getConnection();
50
return
new
ArrayIterator(
$connection
->fetchAll(
$select
));
51
}
52
}
Magento\InventoryIndexer\Indexer\SelectBuilder
Definition:
SelectBuilder.php:23
Magento\InventoryIndexer\Indexer\Stock
Definition:
GetAllStockIds.php:8
Magento\InventoryIndexer\Indexer\Stock\IndexDataProviderByStockId\__construct
__construct(ResourceConnection $resourceConnection, SelectBuilder $selectBuilder)
Definition:
IndexDataProviderByStockId.php:33
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
Magento\InventoryIndexer\Indexer\Stock\IndexDataProviderByStockId
Definition:
IndexDataProviderByStockId.php:17
Magento\InventoryIndexer\Indexer\Stock\IndexDataProviderByStockId\execute
execute(int $stockId)
Definition:
IndexDataProviderByStockId.php:45
$resourceConnection
$resourceConnection
Definition:
website_attribute_sync.php:32
Magento\Framework\App\ResourceConnection
Definition:
ResourceConnection.php:18
$connection
$connection
Definition:
bulk.php:13
Magento\Framework\App\ResourceConnection