You are here

public function StockCheckInterface::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.

2 methods override StockCheckInterface::getTotalStockLevel()
AlwaysInStock::getTotalStockLevel in src/AlwaysInStock.php
Gets the stock level.
LocalStockChecker::getTotalStockLevel in modules/local_storage/src/LocalStockChecker.php
Gets the stock level.

File

src/StockCheckInterface.php, line 23

Class

StockCheckInterface
The stock checker interface.

Namespace

Drupal\commerce_stock

Code

public function getTotalStockLevel(PurchasableEntityInterface $entity, array $locations);