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-catalog
Model
ResourceModel
AddStockStatusToSelect.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryCatalog\Model\ResourceModel
;
9
10
use
Magento\Framework\DB\Select
;
11
use
Magento\InventoryIndexer\Indexer\IndexStructure
;
12
use
Magento\InventoryIndexer\Model\StockIndexTableNameResolverInterface
;
13
17
class
AddStockStatusToSelect
18
{
22
private
$stockIndexTableNameResolver;
23
27
public
function
__construct
(
StockIndexTableNameResolverInterface
$stockIndexTableNameResolver)
28
{
29
$this->stockIndexTableNameResolver = $stockIndexTableNameResolver;
30
}
31
37
public
function
execute
(
Select
$select
,
int
$stockId)
38
{
39
$tableName
= $this->stockIndexTableNameResolver->execute($stockId);
40
41
$select
->joinLeft(
42
[
'stock_status'
=>
$tableName
],
43
'e.sku = stock_status.sku'
,
44
[
IndexStructure::IS_SALABLE
]
45
);
46
}
47
}
Magento\Framework\DB\Select
Definition:
Select.php:33
Magento\InventoryIndexer\Model\StockIndexTableNameResolverInterface
Definition:
StockIndexTableNameResolverInterface.php:15
$tableName
$tableName
Definition:
trigger.php:13
Magento\InventoryIndexer\Indexer\IndexStructure\IS_SALABLE
const IS_SALABLE
Definition:
IndexStructure.php:27
Magento\InventoryCatalog\Model\ResourceModel\AddStockStatusToSelect
Definition:
AddStockStatusToSelect.php:17
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
Magento\InventoryCatalog\Model\ResourceModel\AddStockStatusToSelect\execute
execute(Select $select, int $stockId)
Definition:
AddStockStatusToSelect.php:37
Magento\InventoryIndexer\Indexer\IndexStructure
Definition:
IndexStructure.php:20
Magento\InventoryCatalog\Model\ResourceModel
Definition:
AddIsInStockFieldToCollection.php:8
Magento\InventoryCatalog\Model\ResourceModel\AddStockStatusToSelect\__construct
__construct(StockIndexTableNameResolverInterface $stockIndexTableNameResolver)
Definition:
AddStockStatusToSelect.php:27
Magento\Framework\DB\Select
Definition:
ColumnsRenderer.php:6