Example #1
0
 /**
  * Retrieve stock option array
  *
  * @return array
  */
 public function getStockOption()
 {
     if ($this->moduleManager->isEnabled('Magento_CatalogInventory')) {
         return $this->stock->toOptionArray();
     }
     return [];
 }
Example #2
0
 /**
  * Retrieve stock option array
  *
  * @return array
  */
 public function getStockOption()
 {
     if ($this->catalogData->isModuleEnabled('Magento_CatalogInventory')) {
         return $this->stock->toOptionArray();
     }
     return array();
 }