You are here

public function ProductBundle::setPrice in Commerce Product Bundle 8

Sets the product bundle price.

Parameters

\Drupal\commerce_price\Price $price: The price.

Return value

$this

Overrides BundleInterface::setPrice

File

src/Entity/ProductBundle.php, line 189

Class

ProductBundle
Defines the product bundle entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function setPrice(Price $price) {
  $this
    ->set('bundle_price', $price);
  return $this;
}