Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DisplayProductStatusInfoObserver.php
Go to the documentation of this file.
1 <?php
8 
12 
17 {
22 
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 }
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52