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-catalog-inventory
Model
ProductCollectionStockCondition.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CatalogInventory\Model
;
7
8
use Magento\Catalog\Model\CollectionConditionInterface;
9
use
Magento\Eav\Model\Entity\Collection\AbstractCollection
;
10
use
Magento\Framework\Data\Collection\AbstractDb
;
11
use
Magento\Framework\Data\CollectionModifierInterface
;
12
18
class
ProductCollectionStockCondition
implements
CollectionModifierInterface
19
{
23
private
$stockHelper;
24
29
public
function
__construct
(\
Magento
\CatalogInventory\Helper\
Stock
$stockHelper)
30
{
31
$this->stockHelper = $stockHelper;
32
}
33
37
public
function
apply
(
AbstractDb
$collection
)
38
{
39
$this->stockHelper->addIsInStockFilterToCollection(
$collection
);
40
}
41
}
Magento\CatalogInventory\Model\ProductCollectionStockCondition
Definition:
ProductCollectionStockCondition.php:18
Magento\CatalogInventory\Model\ProductCollectionStockCondition\apply
apply(AbstractDb $collection)
Definition:
ProductCollectionStockCondition.php:37
Magento\Eav\Model\Entity\Collection\AbstractCollection
Definition:
AbstractCollection.php:23
Magento\Framework\Data\Collection\AbstractDb
Definition:
AbstractDb.php:23
Magento
Magento\CatalogInventory\Model
Magento\Framework\Data\CollectionModifierInterface
Definition:
CollectionModifierInterface.php:14
Magento\CatalogInventory\Model\Stock
Definition:
Stock.php:15
Magento\CatalogInventory\Model\ProductCollectionStockCondition\__construct
__construct(\Magento\CatalogInventory\Helper\Stock $stockHelper)
Definition:
ProductCollectionStockCondition.php:29
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17