public function ProductBundleItem::hasVariations in Commerce Product Bundle 8
Gets whether the bundle item has restricted variations.
Return value
bool TRUE if the bundle item has restricted available variations, FALSE otherwise.
Overrides BundleItemInterface::hasVariations
1 call to ProductBundleItem::hasVariations()
- ProductBundleItem::addVariation in src/
Entity/ ProductBundleItem.php - Adds a variation.
File
- src/
Entity/ ProductBundleItem.php, line 310
Class
- ProductBundleItem
- Defines the product bundle item entity.
Namespace
Drupal\commerce_product_bundle\EntityCode
public function hasVariations() {
return !$this
->get('variations')
->isEmpty();
}