public function ProductBundleItem::setRequired in Commerce Product Bundle 8
Set whether the product bundle item is required or not.
Parameters
bool $required: Set TRUE if required, FALSE if optional.
Return value
\Drupal\commerce_product_bundle\Entity\BundleItemInterface The called product bundle item entity.
Overrides BundleItemInterface::setRequired
File
- src/
Entity/ ProductBundleItem.php, line 193
Class
- ProductBundleItem
- Defines the product bundle item entity.
Namespace
Drupal\commerce_product_bundle\EntityCode
public function setRequired($required) {
$this
->set('required', (bool) $required);
return $this;
}