You are here

public function AlwaysInStock::getTotalStockLevel in Commerce Stock 8

Gets the stock level.

Parameters

\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity.

\Drupal\commerce_stock\StockLocationInterface[] $locations: The locations.

Return value

int The stock level.

Overrides StockCheckInterface::getTotalStockLevel

File

src/AlwaysInStock.php, line 23

Class

AlwaysInStock
The Checker and updater implementation for the always in stock service.

Namespace

Drupal\commerce_stock

Code

public function getTotalStockLevel(PurchasableEntityInterface $entity, array $locations) {
  return PHP_INT_MAX;
}