You are here

public function ProductBundleItem::isRequired in Commerce Product Bundle 8

Whether the product bundle item is required or not.

Return value

bool TRUE if required, FALSE if optional.

Overrides BundleItemInterface::isRequired

File

src/Entity/ProductBundleItem.php, line 186

Class

ProductBundleItem
Defines the product bundle item entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function isRequired() {
  return $this
    ->get('required')->value;
}