public function LocalStockChecker::getIsAlwaysInStock in Commerce Stock 8
Check if entity is always in stock.
Parameters
\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity.
Return value
bool TRUE if the entity is always in stock, FALSE otherwise.
Overrides StockCheckInterface::getIsAlwaysInStock
File
- modules/
local_storage/ src/ LocalStockChecker.php, line 198
Class
- LocalStockChecker
- The stock checker implementation for the local stock module.
Namespace
Drupal\commerce_stock_localCode
public function getIsAlwaysInStock(PurchasableEntityInterface $entity) {
return $entity
->get('commerce_stock_always_in_stock') && $entity
->get('commerce_stock_always_in_stock')->value == TRUE;
}