public function ProductBundleItem::getCurrentVariation in Commerce Product Bundle 8
@todo Figure out how to get the currently selected variation without holding state in this object.
Overrides BundleItemInterface::getCurrentVariation
See also
https://www.drupal.org/node/2831613
1 call to ProductBundleItem::getCurrentVariation()
- ProductBundleItem::getUnitPrice in src/
Entity/ ProductBundleItem.php - Gets the price of one unit of the referenced product variations.
File
- src/
Entity/ ProductBundleItem.php, line 471
Class
- ProductBundleItem
- Defines the product bundle item entity.
Namespace
Drupal\commerce_product_bundle\EntityCode
public function getCurrentVariation() {
return $this->currentVariation ?: $this
->getDefaultVariation();
}