You are here

public function ProductBundleStockProxy::getLocationList in Commerce Product Bundle 8

File

modules/commerce_product_bundle_stock/src/ProductBundleStockProxy.php, line 130

Class

ProductBundleStockProxy
Provides a stock service for product bundles.

Namespace

Drupal\commerce_product_bundle_stock

Code

public function getLocationList($return_active_only = TRUE) {
  $services = $this->stockServiceManager
    ->listServices();
  $locations = [];

  /** @var \Drupal\commerce_stock\StockServiceInterface $service */
  foreach ($services as $service) {
    $locations += $service
      ->getStockChecker()
      ->getLocationList();
  }
  return $locations;
}