public function Coupon::isEnabled in Commerce Core 8.2
Gets whether the coupon is enabled.
Return value
bool TRUE if the coupon is enabled, FALSE otherwise.
Overrides CouponInterface::isEnabled
1 call to Coupon::isEnabled()
- Coupon::available in modules/
promotion/ src/ Entity/ Coupon.php - Checks whether the coupon is available for the given order.
File
- modules/
promotion/ src/ Entity/ Coupon.php, line 152
Class
- Coupon
- Defines the Coupon entity.
Namespace
Drupal\commerce_promotion\EntityCode
public function isEnabled() {
return (bool) $this
->getEntityKey('status');
}