public function ProductInterface::hasVariations in Commerce Core 8.2
Gets whether the product has variations.
A product must always have at least one variation, but a newly initialized (or invalid) product entity might not have any.
Return value
bool TRUE if the product has variations, FALSE otherwise.
1 method overrides ProductInterface::hasVariations()
- Product::hasVariations in modules/
product/ src/ Entity/ Product.php - Gets whether the product has variations.
File
- modules/
product/ src/ Entity/ ProductInterface.php, line 87
Class
- ProductInterface
- Defines the interface for products.
Namespace
Drupal\commerce_product\EntityCode
public function hasVariations();