You are here

public function ProductBundleItem::hasUnitPrice in Commerce Product Bundle 8

Check whether the bundleItem has an own unit price.

Return value

bool True it the bundle item has an own unit price set, false if not.

Overrides BundleItemInterface::hasUnitPrice

File

src/Entity/ProductBundleItem.php, line 214

Class

ProductBundleItem
Defines the product bundle item entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function hasUnitPrice() {
  return !$this
    ->get('unit_price')
    ->isEmpty();
}