public function ProductInterface::hasVariation in Commerce Core 8.2
Checks whether the product has a given variation.
Parameters
\Drupal\commerce_product\Entity\ProductVariationInterface $variation: The variation.
Return value
bool TRUE if the variation was found, FALSE otherwise.
1 method overrides ProductInterface::hasVariation()
- Product::hasVariation in modules/
product/ src/ Entity/ Product.php - Checks whether the product has a given variation.
File
- modules/
product/ src/ Entity/ ProductInterface.php, line 118
Class
- ProductInterface
- Defines the interface for products.
Namespace
Drupal\commerce_product\EntityCode
public function hasVariation(ProductVariationInterface $variation);