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
Observer
DisplayProductStatusInfoObserver.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CatalogInventory\Observer
;
8
9
use
Magento\CatalogInventory\Api\StockConfigurationInterface
;
10
use
Magento\Framework\Event\Observer
as
EventObserver
;
11
use
Magento\Framework\Event\ObserverInterface
;
12
16
class
DisplayProductStatusInfoObserver
implements
ObserverInterface
17
{
21
protected
$stockConfiguration
;
22
26
public
function
__construct
(
StockConfigurationInterface
$stockConfiguration
)
27
{
28
$this->stockConfiguration =
$stockConfiguration
;
29
}
30
37
public
function
execute
(
EventObserver
$observer
)
38
{
39
$info
=
$observer
->getEvent()->getStatus();
40
$info
->setDisplayStatus($this->stockConfiguration->isDisplayProductStockStatus());
41
}
42
}
Magento\Framework\Event\ObserverInterface
Definition:
ObserverInterface.php:16
Magento\CatalogInventory\Observer\DisplayProductStatusInfoObserver\__construct
__construct(StockConfigurationInterface $stockConfiguration)
Definition:
DisplayProductStatusInfoObserver.php:26
Magento\CatalogInventory\Observer\DisplayProductStatusInfoObserver\execute
execute(EventObserver $observer)
Definition:
DisplayProductStatusInfoObserver.php:37
Magento\CatalogInventory\Observer\DisplayProductStatusInfoObserver\$stockConfiguration
$stockConfiguration
Definition:
DisplayProductStatusInfoObserver.php:21
$observer
$observer
Definition:
second_website_with_second_currency.php:38
Magento\Framework\Event\Observer
Definition:
Collection.php:12
Magento\CatalogInventory\Observer\DisplayProductStatusInfoObserver
Definition:
DisplayProductStatusInfoObserver.php:16
Magento\CatalogInventory\Observer
Definition:
AddStockItemsObserverTest.php:7
Magento\CatalogInventory\Api\StockConfigurationInterface
Definition:
StockConfigurationInterface.php:17
$info
foreach( $_productCollection as $_product)() ?>" class $info
Definition:
listing.phtml:52