21 private $activeTableSwitcher;
26 private $stockStatusSelectBuilder;
31 private $bundleOptionStockDataSelectBuilder;
61 ->get(StockStatusSelectBuilder::class);
64 ->get(BundleOptionStockDataSelectBuilder::class);
74 return $this->
getTable(
'catalog_product_bundle_stock_index');
89 ? $this->activeTableSwitcher->getAdditionalTableName($this->
getMainTable())
92 $select = $this->bundleOptionStockDataSelectBuilder->buildSelect($idxTable);
96 .
$connection->getCheckSql(
'e.required_options = 0',
'i.stock_status',
'0')
102 if ($entityIds !==
null) {
103 $select->where(
'product.entity_id IN(?)', $entityIds);
107 $selectNonRequired = clone
$select;
109 $select->where(
'bo.required = ?', 1);
110 $selectNonRequired->where(
'bo.required = ?', 0)->having(
$status .
' = 1');
132 $select = parent::_getStockStatusSelect($entityIds, $usePrimaryTable);
135 $statusNotNullExpr =
$connection->getCheckSql(
'o.stock_status IS NOT NULL',
'o.stock_status',
'0');
149 if ($entityIds !==
null) {
150 $select->where(
'e.entity_id IN(?)', $entityIds);
164 parent::_prepareIndexTable($entityIds);
178 parent::_updateIndex($entityIds);
_getStockStatusSelect($entityIds=null, $usePrimaryTable=false)
getStatusExpression(AdapterInterface $connection, $isAggregate=false)
_prepareBundleOptionStockData($entityIds=null, $usePrimaryTable=false)
__construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Indexer\Table\StrategyInterface $tableStrategy, \Magento\Eav\Model\Config $eavConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, $connectionName=null, \Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher $activeTableSwitcher=null, StockStatusSelectBuilder $stockStatusSelectBuilder=null, BundleOptionStockDataSelectBuilder $bundleOptionStockDataSelectBuilder=null)
_prepareIndexTable($entityIds=null)
_cleanBundleOptionStockData()