public function Promotion::hasCoupons in Commerce Core 8.2
Gets whether the promotion has coupons.
Return value
bool TRUE if the promotion has coupons, FALSE otherwise.
Overrides PromotionInterface::hasCoupons
File
- modules/
promotion/ src/ Entity/ Promotion.php, line 345
Class
- Promotion
- Defines the promotion entity class.
Namespace
Drupal\commerce_promotion\EntityCode
public function hasCoupons() {
return !$this
->get('coupons')
->isEmpty();
}