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