public function ProductBundleStockProxyService::__construct in Commerce Product Bundle 8
Constructs a new ProductBundleStockProxyService object.
File
- modules/
commerce_product_bundle_stock/ src/ ProductBundleStockProxyService.php, line 37
Class
- ProductBundleStockProxyService
- A stock service for always in stock products.
Namespace
Drupal\commerce_product_bundle_stockCode
public function __construct() {
// The service manager is not injected into the constructor because the
// it needs to load before being used here.
$stock_service_manager = \Drupal::service('commerce_stock.service_manager');
$this->stockChecker = new ProductBundleStockProxy($stock_service_manager);
$this->stockUpdater = $this->stockChecker;
$this->stockServiceConfig = new StockServiceConfig($this->stockChecker);
}