public function StockCheckInterface::getIsInStock in Commerce Stock 8
Check if purchasable entity is in stock.
Parameters
\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity.
\Drupal\commerce_stock\StockLocationInterface[] $locations: The locations to check against.
Return value
bool TRUE if the entity is in stock, FALSE otherwise.
2 methods override StockCheckInterface::getIsInStock()
- AlwaysInStock::getIsInStock in src/
AlwaysInStock.php - Check if purchasable entity is in stock.
- LocalStockChecker::getIsInStock in modules/
local_storage/ src/ LocalStockChecker.php - Check if purchasable entity is in stock.
File
- src/
StockCheckInterface.php, line 36
Class
- StockCheckInterface
- The stock checker interface.
Namespace
Drupal\commerce_stockCode
public function getIsInStock(PurchasableEntityInterface $entity, array $locations);