public function Coupon::setEnabled in Commerce Core 8.2
Sets whether the coupon is enabled.
Parameters
bool $enabled: Whether the coupon is enabled.
Return value
$this
Overrides CouponInterface::setEnabled
File
- modules/
promotion/ src/ Entity/ Coupon.php, line 159
Class
- Coupon
- Defines the Coupon entity.
Namespace
Drupal\commerce_promotion\EntityCode
public function setEnabled($enabled) {
$this
->set('status', (bool) $enabled);
return $this;
}