You are here

public function BundleItemInterface::setProduct in Commerce Product Bundle 8

Set the referenced product.

If a new product is referenced, the variations references will be resetted.

Parameters

\Drupal\commerce_product\Entity\ProductInterface $product: The product.

Return value

$this

1 method overrides BundleItemInterface::setProduct()
ProductBundleItem::setProduct in src/Entity/ProductBundleItem.php
@inheritdoc

File

src/Entity/BundleItemInterface.php, line 184

Class

BundleItemInterface
Provides an interface for defining product bundle item entities.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function setProduct(ProductInterface $product);