You are here

public function ProductBundle::hasBundleItems in Commerce Product Bundle 8

Checks whether the bundle has any bundle items.

Return value

bool True if the bundle has any bundle items, false other wise.

Overrides BundleInterface::hasBundleItems

File

src/Entity/ProductBundle.php, line 261

Class

ProductBundle
Defines the product bundle entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

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