public function ProductBundleItem::getVariationIds in Commerce Product Bundle 8
Gets the variation IDs.
Return value
int[] The variation IDs.
Overrides BundleItemInterface::getVariationIds
1 call to ProductBundleItem::getVariationIds()
- ProductBundleItem::getVariationIndex in src/
Entity/ ProductBundleItem.php - Get the index of a variation in the variation references.
File
- src/
Entity/ ProductBundleItem.php, line 357
Class
- ProductBundleItem
- Defines the product bundle item entity.
Namespace
Drupal\commerce_product_bundle\EntityCode
public function getVariationIds() {
$variations = $this
->getVariations();
if (empty($variations)) {
return NULL;
}
return array_map(function ($variation) {
return $variation
->id();
}, $this
->getVariations());
}