public function ProductBundleItem::getBundle in Commerce Product Bundle 8
Gets the parent bundle entity.
Return value
\Drupal\commerce_product_bundle\Entity\BundleInterface The product bundle entity, or null.
Overrides BundleItemInterface::getBundle
File
- src/
Entity/ ProductBundleItem.php, line 131
Class
- ProductBundleItem
- Defines the product bundle item entity.
Namespace
Drupal\commerce_product_bundle\EntityCode
public function getBundle() {
return $this
->get('bundle_id')->entity;
}